summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/Interpreter.scala9
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)