From 88ab0147bf45b7ce92da7285d80888e1753bb184 Mon Sep 17 00:00:00 2001 From: Erik Broberg Date: Thu, 11 Aug 2016 13:03:55 -0400 Subject: [PATCH] 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. --- modules/newhorizons/util/instrumenttimesparser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/newhorizons/util/instrumenttimesparser.cpp b/modules/newhorizons/util/instrumenttimesparser.cpp index ea0122200b..273d5e9258 100644 --- a/modules/newhorizons/util/instrumenttimesparser.cpp +++ b/modules/newhorizons/util/instrumenttimesparser.cpp @@ -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