Browse Source

made error check in ExprTk-Evaluator a bit more verbose

Former-commit-id: b0b6d65671 [formerly d227204446]
Former-commit-id: 8495425cca
tempestpy_adaptions
dehnert 8 years ago
parent
commit
0cda7daf75
  1. 4
      src/storage/expressions/ExprtkExpressionEvaluator.cpp

4
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;
}

Loading…
Cancel
Save