[icinga-checkins] icinga.org: icinga2/master: Make sure source information is always available for error messages

git at icinga.org git at icinga.org
Fri Nov 21 18:36:44 CET 2014


Module: icinga2
Branch: master
Commit: 0ab61291c6990594d767d87a0c04963cc59e79e8
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=0ab61291c6990594d767d87a0c04963cc59e79e8

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Fri Nov 21 18:35:59 2014 +0100

Make sure source information is always available for error messages

refs #7699

---

 lib/config/expression.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/config/expression.cpp b/lib/config/expression.cpp
index 7bcb627..e3cbc3d 100644
--- a/lib/config/expression.cpp
+++ b/lib/config/expression.cpp
@@ -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()))



More information about the icinga-checkins mailing list