forked from lix-project/lix
* 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.
This commit is contained in:
parent
63a17d4bd5
commit
1332dd1ed3
|
@ -232,8 +232,8 @@ static Expr prim_tryEval(EvalState & state, const ATermVector & args)
|
||||||
Expr val = evalExpr(state, args[0]);
|
Expr val = evalExpr(state, args[0]);
|
||||||
res.set(toATerm("value"), makeAttrRHS(val, makeNoPos()));
|
res.set(toATerm("value"), makeAttrRHS(val, makeNoPos()));
|
||||||
res.set(toATerm("success"), makeAttrRHS(eTrue, makeNoPos()));
|
res.set(toATerm("success"), makeAttrRHS(eTrue, makeNoPos()));
|
||||||
} catch (Error & e) {
|
} catch (AssertionError & e) {
|
||||||
printMsg(lvlInfo, format("tryEval caught an error: %1%: %2%") % e.prefix() % e.msg());
|
printMsg(lvlDebug, format("tryEval caught an error: %1%: %2%") % e.prefix() % e.msg());
|
||||||
res.set(toATerm("value"), makeAttrRHS(eFalse, makeNoPos()));
|
res.set(toATerm("value"), makeAttrRHS(eFalse, makeNoPos()));
|
||||||
res.set(toATerm("success"), makeAttrRHS(eFalse, makeNoPos()));
|
res.set(toATerm("success"), makeAttrRHS(eFalse, makeNoPos()));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue