]> granicus.if.org Git - icinga2/commitdiff
Make sure source information is always available for error messages
authorGunnar Beutner <gunnar@beutner.name>
Fri, 21 Nov 2014 17:35:59 +0000 (18:35 +0100)
committerGunnar Beutner <gunnar@beutner.name>
Fri, 21 Nov 2014 17:35:59 +0000 (18:35 +0100)
refs #7699

lib/config/expression.cpp

index 7bcb627b48aeb3bb84daf296c504d01718eb7606..e3cbc3db34c8b39304379d372c0c75807a4d510d 100644 (file)
@@ -46,7 +46,7 @@ Value Expression::Evaluate(const Object::Ptr& context, DebugHint *dhint) const
 
                return DoEvaluate(context, dhint);
        } catch (const std::exception& ex) {
-               if (dynamic_cast<const ConfigError *>(&ex) || boost::get_error_info<boost::errinfo_nested_exception>(ex))
+               if (boost::get_error_info<boost::errinfo_nested_exception>(ex))
                        throw;
                else
                        BOOST_THROW_EXCEPTION(ConfigError("Error while evaluating expression: " + String(ex.what()))