proper handling of improper get-value
authorMorgan Deters <mdeters@gmail.com>
Mon, 13 Feb 2012 01:06:01 +0000 (01:06 +0000)
committerMorgan Deters <mdeters@gmail.com>
Mon, 13 Feb 2012 01:06:01 +0000 (01:06 +0000)
src/expr/command.cpp

index 47c6d1eb5e90237612524ee54cefc5123dc5df0b..7d060186a7f28fc7efd7c7cc4c12cdef51104da8 100644 (file)
@@ -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() {