From 2f851bd1f7484c0650158ef335c019f8f7496f2a Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Mon, 1 Nov 2010 20:30:05 +0000 Subject: Don't truncate stack traces in the repl. --- src/compiler/scala/tools/nsc/Interpreter.scala | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/compiler') 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) -- cgit v1.2.3