Skip to content
Snippets Groups Projects
Unverified Commit 1efc9fe5 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema Committed by GitHub
Browse files

Merge pull request #196 from lofar-astron/improve-model-parse-error2

Fix confusing error when something is wrong with the model
parents d353ebab 15b26745
No related branches found
No related tags found
No related merge requests found
...@@ -110,8 +110,15 @@ namespace DP3 { ...@@ -110,8 +110,15 @@ namespace DP3 {
ss << sourcePatterns; ss << sourcePatterns;
itsDirectionsStr = ss.str(); itsDirectionsStr = ss.str();
vector<string> patchNames=makePatchList(sourceDB, sourcePatterns); vector<string> patchNames;
try {
patchNames = makePatchList(sourceDB, sourcePatterns);
itsPatchList = makePatches (sourceDB, patchNames, patchNames.size()); itsPatchList = makePatches (sourceDB, patchNames, patchNames.size());
}
catch(std::exception& exception)
{
throw std::runtime_error(std::string("Something went wrong while reading the source model. The error was: ") + exception.what());
}
#ifdef HAVE_LOFAR_BEAM #ifdef HAVE_LOFAR_BEAM
if (itsApplyBeam) { if (itsApplyBeam) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment