# HG changeset patch # User wenzelm # Date 1535220649 -7200 # Node ID 4597812d518231883efc7ecf1d1b5c68e428f73c # Parent 57455c561849f125ce56a81fe34b6c73c050599e tuned message; diff -r 57455c561849 -r 4597812d5182 src/Pure/General/exn.scala --- a/src/Pure/General/exn.scala Sat Aug 25 17:20:06 2018 +0200 +++ b/src/Pure/General/exn.scala Sat Aug 25 20:10:49 2018 +0200 @@ -138,4 +138,10 @@ def message(exn: Throwable): String = user_message(exn) getOrElse (if (is_interrupt(exn)) "Interrupt" else exn.toString) + + + /* trace */ + + def trace(exn: Throwable): String = + exn.getStackTrace.mkString("\n") } diff -r 57455c561849 -r 4597812d5182 src/Pure/System/command_line.scala --- a/src/Pure/System/command_line.scala Sat Aug 25 17:20:06 2018 +0200 +++ b/src/Pure/System/command_line.scala Sat Aug 25 20:10:49 2018 +0200 @@ -29,8 +29,7 @@ try { body } catch { case exn: Throwable => - if (debug) exn.printStackTrace - Output.error_message(Exn.message(exn)) + Output.error_message(Exn.message(exn) + (if (debug) "\n" + Exn.trace(exn) else "")) Exn.return_code(exn, 2) } sys.exit(rc)