Browse Source

improved error message for unsupported operations

Former-commit-id: a5bba8670d [formerly 81693f6d7c]
Former-commit-id: c4c197d0ee
main
sjunges 9 years ago
parent
commit
10419d4bba
  1. 7
      src/parser/JaniParser.cpp
  2. 2
      src/parser/JaniParser.h

7
src/parser/JaniParser.cpp

@ -20,6 +20,8 @@ namespace storm {
// Defaults
////////////
const bool JaniParser::defaultVariableTransient = false;
const std::set<std::string> JaniParser::unsupportedOpstrings({"sin", "cos", "tan", "cot", "sec", "csc", "asin", "acos", "atan", "acot", "asec", "acsc",
"sinh", "cosh", "tanh", "coth", "sech", "csch", "asinh", "acosh", "atanh", "asinh", "acosh"});
std::string getString(json const& structure, std::string const& errorInfo) {
@ -475,7 +477,10 @@ namespace storm {
ensureNumericalType(arguments[1], opstring, 1, scopeDescription);
// TODO implement
STORM_LOG_THROW(false, storm::exceptions::NotImplementedException, "log operation is not yet implemented");
} else {
} else if (unsupportedOpstrings.count(opstring) > 0){
STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "Opstring " + opstring + " is not supported by storm");
} else {
STORM_LOG_THROW(false, storm::exceptions::InvalidJaniException, "Unknown operator " << opstring << " in " << scopeDescription << ".");
}
}

2
src/parser/JaniParser.h

@ -72,6 +72,8 @@ namespace storm {
//////////
static const bool defaultVariableTransient;
static const std::set<std::string> unsupportedOpstrings;
};
}
}

Loading…
Cancel
Save