Browse Source

Calling getExpression on an undefined constant is now properly treated with an exception.

Former-commit-id: 2d3e06a20a
tempestpy_adaptions
dehnert 11 years ago
parent
commit
63601e0b8a
  1. 3
      src/storage/prism/Constant.cpp

3
src/storage/prism/Constant.cpp

@ -1,4 +1,6 @@
#include "src/storage/prism/Constant.h"
#include "src/exceptions/ExceptionMacros.h"
#include "src/exceptions/IllegalFunctionCallException.h"
namespace storm {
namespace prism {
@ -23,6 +25,7 @@ namespace storm {
}
storm::expressions::Expression const& Constant::getExpression() const {
LOG_THROW(this->isDefined(), storm::exceptions::IllegalFunctionCallException, "Unable to retrieve defining expression for undefined constant.");
return this->expression;
}

Loading…
Cancel
Save