diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-01 20:30:05 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-01 20:30:05 +0000 |
commit | 2f851bd1f7484c0650158ef335c019f8f7496f2a (patch) | |
tree | 3b29fb635415f3eb5d89c163123bbf50ffb90376 /src | |
parent | 89f3533a2f43547c1478d6bdcd8df35742cf9bf9 (diff) | |
download | scala-2f851bd1f7484c0650158ef335c019f8f7496f2a.tar.gz scala-2f851bd1f7484c0650158ef335c019f8f7496f2a.tar.bz2 scala-2f851bd1f7484c0650158ef335c019f8f7496f2a.zip |
Don't truncate stack traces in the repl.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/Interpreter.scala | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala index 9571df6fe0..a28bb7d17d 100644 --- a/src/compiler/scala/tools/nsc/Interpreter.scala +++ b/src/compiler/scala/tools/nsc/Interpreter.scala @@ -337,10 +337,10 @@ class Interpreter(val settings: Settings, out: PrintWriter) { } /** Clean up a string for output */ - private def clean(str: String) = truncPrintString( + private def clean(str: String) = truncPrintString(cleanNoTruncate(str)) + private def cleanNoTruncate(str: String) = if (isettings.unwrapStrings) stripWrapperGunk(str) else str - ) /** Indent some code by the width of the scala> prompt. * This way, compiler error messages read better. @@ -577,8 +577,9 @@ class Interpreter(val settings: Settings, out: PrintWriter) { def interpret(line: String, synthetic: Boolean): IR.Result = { def loadAndRunReq(req: Request) = { val (result, succeeded) = req.loadAndRun - if (printResults || !succeeded) - out print clean(result) + // don't truncate stack traces + if (!succeeded) out print cleanNoTruncate(result) + else if (printResults) out print clean(result) // book-keeping if (succeeded && !synthetic) |