diff options
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 045e5f632ff6..eac13c3fd980 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -383,7 +383,13 @@ Expr evalExpr(EvalState & state, Expr e) /* Otherwise, evaluate and memoize. */ state.normalForms.set(e, state.blackHole); - nf = evalExpr2(state, e); + try { + nf = evalExpr2(state, e); + } catch (Error & err) { + debug("removing black hole"); + state.normalForms.remove(e); + throw; + } state.normalForms.set(e, nf); return nf; } |