diff options
author | Paul Phillips <paulp@improving.org> | 2012-11-05 07:05:01 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-11-09 16:48:32 -0700 |
commit | 3292c4a8473d51bfe6d35522196d094081152fd9 (patch) | |
tree | fc222a1001bc9837763f3f48e0e3bd4777b5cc02 /src/compiler/scala/tools/nsc/Global.scala | |
parent | 8da7e37674d771e177445cc0c56eab7b7016c2f2 (diff) | |
download | scala-3292c4a8473d51bfe6d35522196d094081152fd9.tar.gz scala-3292c4a8473d51bfe6d35522196d094081152fd9.tar.bz2 scala-3292c4a8473d51bfe6d35522196d094081152fd9.zip |
A utility function to summarize an exception.
Now when I start the repl and trigger an exception during
initialization, it offers a one line message like:
uncaught exception during compilation:
AssertionError("assertion failed: (14,13)")
@ scala.reflect.internal.Symbols$Symbol.updateInfo(Symbols.scala:1309)
Which is a marked debugging improvement from RC1:
uncaught exception during compilation: java.lang.AssertionError
Diffstat (limited to 'src/compiler/scala/tools/nsc/Global.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index f0984c2ebc..552146b9d4 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -1525,8 +1525,8 @@ class Global(var currentSettings: Settings, var reporter: Reporter) val shown = if (settings.verbose.value) stackTraceString(ex) else - ex.getClass.getName - // ex.printStackTrace(Console.out) // DEBUG for fsc, note that error stacktraces do not print in fsc + stackTraceHeadString(ex) // note that error stacktraces do not print in fsc + globalError(supplementErrorMessage("uncaught exception during compilation: " + shown)) throw ex } |