We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f9f364 commit 00fbf27Copy full SHA for 00fbf27
compiler/src/dotty/tools/dotc/printing/Formatting.scala
@@ -31,7 +31,8 @@ object Formatting {
31
case NonFatal(ex)
32
if !ctx.mode.is(Mode.PrintShowExceptions) &&
33
!ctx.settings.YshowPrintErrors.value =>
34
- s"[cannot display due to $ex, raw string = ${arg.toString}]"
+ val msg = ex match { case te: TypeError => te.toMessage case _ => ex.getMessage }
35
+ s"[cannot display due to $msg, raw string = ${arg.toString}]"
36
}
37
case _ => arg.toString
38
0 commit comments