From 1332dd1ed34b45b7e970111da561f20ffe6bc6b2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 23 Sep 2009 19:19:26 +0000 Subject: * 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. --- src/libexpr/primops.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libexpr') diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 6408ca9569..7ce28757c4 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())); } -- cgit 1.4.1