Fix bug causing the instrument times parser to only work in Debug mode

OBS: ghoul asserts are removed in Release mode. So don't put crucial
statements that will have side effects in a ghoul assert. This is what
caused the bug which is fixed in this commit.
This commit is contained in:
Erik Broberg
2016-08-11 13:03:55 -04:00
parent 9ac5476146
commit 88ab0147bf

View File

@@ -59,7 +59,9 @@ InstrumentTimesParser::InstrumentTimesParser(
}
ghoul::Dictionary instruments;
ghoul_assert(inputDict.getValue("Instruments", instruments), "Must define instruments");
if (!inputDict.getValue("Instruments", instruments)) {
throw std::runtime_error("Must define instruments");
}
_detectorType = "CAMERA"; //default value