From 0cda7daf7563398ac6a5548473f8a5e657618952 Mon Sep 17 00:00:00 2001 From: dehnert Date: Fri, 23 Sep 2016 15:52:02 +0200 Subject: [PATCH] made error check in ExprTk-Evaluator a bit more verbose Former-commit-id: b0b6d65671747fc6701d285af9d486a1816281f8 [formerly d227204446ef033d6bb7859c21e9f7fdcf259cd8] Former-commit-id: 8495425cca2c95fb7f1e24e9400c9af01114d5ca --- src/storage/expressions/ExprtkExpressionEvaluator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/storage/expressions/ExprtkExpressionEvaluator.cpp b/src/storage/expressions/ExprtkExpressionEvaluator.cpp index d24bc742c..b1cc76c9d 100755 --- a/src/storage/expressions/ExprtkExpressionEvaluator.cpp +++ b/src/storage/expressions/ExprtkExpressionEvaluator.cpp @@ -2,7 +2,9 @@ #include "src/storage/expressions/ExpressionManager.h" #include "src/adapters/CarlAdapter.h" + #include "src/utility/macros.h" +#include "src/exceptions/UnexpectedException.h" namespace storm { namespace expressions { @@ -49,7 +51,7 @@ namespace storm { CompiledExpressionType& compiledExpression = result.first->second; compiledExpression.register_symbol_table(symbolTable); bool parsingOk = parser.compile(ToExprtkStringVisitor().toString(expression), compiledExpression); - STORM_LOG_ASSERT(parsingOk, "Expression was not properly parsed by ExprTk: " << expression); + STORM_LOG_THROW(parsingOk, storm::exceptions::UnexpectedException, "Expression was not properly parsed by ExprTk: " << expression << ". (Returned error: " << parser.error() << ")"); return compiledExpression; }