You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@toree.apache.org by ch...@apache.org on 2016/09/27 14:28:12 UTC
[3/4] incubator-toree git commit: Ensure that that messages from
retrieving the exception don't leak out.
Ensure that that messages from retrieving the exception don't leak out.
Project: http://git-wip-us.apache.org/repos/asf/incubator-toree/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-toree/commit/e0354f73
Tree: http://git-wip-us.apache.org/repos/asf/incubator-toree/tree/e0354f73
Diff: http://git-wip-us.apache.org/repos/asf/incubator-toree/diff/e0354f73
Branch: refs/heads/master
Commit: e0354f73b57968d60e1c5474b62b9fd6c4481597
Parents: 0dc6701
Author: Marius Van Niekerk <mn...@vm179.corp.maxpointinteractive.com>
Authored: Thu Sep 22 10:30:31 2016 -0400
Committer: Marius van Niekerk <ma...@gmail.com>
Committed: Tue Sep 27 10:23:47 2016 -0400
----------------------------------------------------------------------
.../kernel/interpreter/scala/ScalaInterpreterSpecific.scala | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-toree/blob/e0354f73/scala-interpreter/src/main/scala-2.11/org/apache/toree/kernel/interpreter/scala/ScalaInterpreterSpecific.scala
----------------------------------------------------------------------
diff --git a/scala-interpreter/src/main/scala-2.11/org/apache/toree/kernel/interpreter/scala/ScalaInterpreterSpecific.scala b/scala-interpreter/src/main/scala-2.11/org/apache/toree/kernel/interpreter/scala/ScalaInterpreterSpecific.scala
index 6a31a55..b215d90 100644
--- a/scala-interpreter/src/main/scala-2.11/org/apache/toree/kernel/interpreter/scala/ScalaInterpreterSpecific.scala
+++ b/scala-interpreter/src/main/scala-2.11/org/apache/toree/kernel/interpreter/scala/ScalaInterpreterSpecific.scala
@@ -352,7 +352,9 @@ trait ScalaInterpreterSpecific extends SettingsProducerLike { this: ScalaInterpr
}
private def retrieveLastException: Throwable = {
- iMain.interpret("_exceptionHack.lastException = lastException")
+ iMain.beSilentDuring {
+ iMain.interpret("_exceptionHack.lastException = lastException")
+ }
exceptionHack.lastException
}
@@ -423,7 +425,8 @@ trait ScalaInterpreterSpecific extends SettingsProducerLike { this: ScalaInterpr
"Compile Error", output, List()
)
else
- ExecuteError("Unknown", "Unable to retrieve error!", List())
+ // May as capture the output here. Could be useful
+ ExecuteError("Unknown Error", output, List())
}
}