summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala
index 123ed92a66..206067efd8 100644
--- a/src/compiler/scala/tools/nsc/Interpreter.scala
+++ b/src/compiler/scala/tools/nsc/Interpreter.scala
@@ -772,7 +772,11 @@ class Interpreter(val settings: Settings, out: PrintWriter)
}
(reflectionUnwrapper either pair) match {
- case Left(e) => (stringFrom(unwrap(e).printStackTrace(_)), false)
+ case Left(e) =>
+ val unwrapped = unwrap(e)
+ beQuietDuring { bind("lastException", "java.lang.Throwable", unwrapped) }
+
+ (stringFrom(unwrapped.printStackTrace(_)), false)
case Right((res, success)) => (res, success)
}
}