From c7346a275c4cdcb59b3961241ddc52b79452d716 Mon Sep 17 00:00:00 2001
From: Eelco Dolstra <edolstra@gmail.com>
Date: Tue, 20 Jun 2017 12:11:22 +0200
Subject: [PATCH] Restore thunks on any exception

There's no reason to restrict this to Error exceptions. This shouldn't
matter to #1407 since the repl doesn't catch non-Error exceptions
anyway, but you never know...
---
 src/libexpr/eval-inline.hh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh
index 0748fbd3f..8cc50e561 100644
--- a/src/libexpr/eval-inline.hh
+++ b/src/libexpr/eval-inline.hh
@@ -33,7 +33,7 @@ void EvalState::forceValue(Value & v, const Pos & pos)
             v.type = tBlackhole;
             //checkInterrupt();
             expr->eval(*this, *env, v);
-        } catch (Error & e) {
+        } catch (...) {
             v.type = tThunk;
             v.thunk.env = env;
             v.thunk.expr = expr;
-- 
GitLab