diff options
Diffstat (limited to 'src/expr/command.cpp')
-rw-r--r-- | src/expr/command.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/expr/command.cpp b/src/expr/command.cpp index 8d089901b..3dac28e11 100644 --- a/src/expr/command.cpp +++ b/src/expr/command.cpp @@ -494,10 +494,14 @@ Expr DefineFunctionCommand::getFormula() const throw() { void DefineFunctionCommand::invoke(SmtEngine* smtEngine) throw() { //Dump("declarations") << *this << endl; -- done by SmtEngine - if(!d_func.isNull()) { - smtEngine->defineFunction(d_func, d_formals, d_formula); + try { + if(!d_func.isNull()) { + smtEngine->defineFunction(d_func, d_formals, d_formula); + } + d_commandStatus = CommandSuccess::instance(); + } catch(exception& e) { + d_commandStatus = new CommandFailure(e.what()); } - d_commandStatus = CommandSuccess::instance(); } Command* DefineFunctionCommand::exportTo(ExprManager* exprManager, ExprManagerMapCollection& variableMap) { |