Browse Source

Throw an exception instead of assertion when 'wrong' jani was detected

tempestpy_adaptions
TimQu 6 years ago
parent
commit
d8bc689259
  1. 2
      src/storm-parsers/parser/JaniParser.cpp
  2. 2
      src/storm/storage/jani/JSONExporter.cpp

2
src/storm-parsers/parser/JaniParser.cpp

@ -1022,7 +1022,7 @@ namespace storm {
}
STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "No supported operator declaration found for complex expressions as " << expressionStructure.dump() << " in " << scopeDescription << ".");
}
assert(false);
STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "No supported expression found at " << expressionStructure.dump() << " in " << scopeDescription << ".");
// Silly warning suppression.
return storm::expressions::Expression();

2
src/storm/storage/jani/JSONExporter.cpp

@ -603,7 +603,7 @@ namespace storm {
}
}
}
STORM_LOG_ASSERT(false, "Expression variable '" << expression.getVariableName() << "' not known in Jani data structures.");
STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "Expression variable '" << expression.getVariableName() << "' not known in Jani data structures.");
return modernjson::json(); // should not reach this point.
}
boost::any ExpressionToJson::visit(storm::expressions::UnaryBooleanFunctionExpression const& expression, boost::any const& data) {

Loading…
Cancel
Save