about summary refs log tree commit diff
path: root/src/libexpr
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2009-09-23T19·19+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2009-09-23T19·19+0000
commit1332dd1ed34b45b7e970111da561f20ffe6bc6b2 (patch)
tree3c3902472f1c4f07219bcd8115c6e6081e22bae8 /src/libexpr
parent63a17d4bd5e0a9c0f896221017ab518a6cc4c79b (diff)
* tryEval shouldn't catch all exceptions of type Error, since not all
  of them leave the evaluator in a continuable state.  Also, it should
  be less chatty.

Diffstat (limited to 'src/libexpr')
-rw-r--r--src/libexpr/primops.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index 6408ca9569c5..7ce28757c497 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -232,8 +232,8 @@ static Expr prim_tryEval(EvalState & state, const ATermVector & args)
         Expr val = evalExpr(state, args[0]);
         res.set(toATerm("value"), makeAttrRHS(val, makeNoPos()));
         res.set(toATerm("success"), makeAttrRHS(eTrue, makeNoPos()));
-    } catch (Error & e) {
-        printMsg(lvlInfo, format("tryEval caught an error: %1%: %2%") % e.prefix() % e.msg());
+    } catch (AssertionError & e) {
+        printMsg(lvlDebug, format("tryEval caught an error: %1%: %2%") % e.prefix() % e.msg());
         res.set(toATerm("value"), makeAttrRHS(eFalse, makeNoPos()));
         res.set(toATerm("success"), makeAttrRHS(eFalse, makeNoPos()));
     }