From: Morgan Deters Date: Mon, 13 Feb 2012 01:06:01 +0000 (+0000) Subject: proper handling of improper get-value X-Git-Tag: cvc5-1.0.0~8331 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c691f9118e104129bf894b568542c7509e9747a0;p=cvc5.git proper handling of improper get-value --- diff --git a/src/expr/command.cpp b/src/expr/command.cpp index 47c6d1eb5..7d060186a 100644 --- a/src/expr/command.cpp +++ b/src/expr/command.cpp @@ -484,9 +484,13 @@ Expr GetValueCommand::getTerm() const throw() { } void GetValueCommand::invoke(SmtEngine* smtEngine) throw() { - d_result = d_term.getExprManager()->mkExpr(kind::TUPLE, d_term, - smtEngine->getValue(d_term)); - d_commandStatus = CommandSuccess::instance(); + try { + d_result = d_term.getExprManager()->mkExpr(kind::TUPLE, d_term, + smtEngine->getValue(d_term)); + d_commandStatus = CommandSuccess::instance(); + } catch(exception& e) { + d_commandStatus = new CommandFailure(e.what()); + } } Expr GetValueCommand::getResult() const throw() {