File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -74,18 +74,23 @@ trait TraceSyntax:
74
74
while logctx.reporter.isInstanceOf [StoreReporter ] do logctx = logctx.outer
75
75
def margin = ctx.base.indentTab * ctx.base.indent
76
76
def doLog (s : String ) = if isForced then println(s) else report.log(s)
77
- def finalize (result : Any , note : String ) =
77
+ def finalize (msg : String ) =
78
78
if ! finalized then
79
79
ctx.base.indent -= 1
80
- doLog(s " $margin${trailing(result)}$note " )
80
+ doLog(s " $margin$msg " )
81
81
finalized = true
82
82
try
83
83
doLog(s " $margin$leading" )
84
84
ctx.base.indent += 1
85
85
val res = op
86
- finalize(res, " " )
86
+ finalize(trailing( res) )
87
87
res
88
- catch case ex : Throwable =>
89
- finalize(" <missing>" , s " (with exception $ex) " )
90
- throw ex
88
+ catch
89
+ case ex : runtime.NonLocalReturnControl [T ] =>
90
+ finalize(trailing(ex.value))
91
+ throw ex
92
+ case ex : Throwable =>
93
+ val msg = s " <== $q = <missing> (with exception $ex) "
94
+ finalize(msg)
95
+ throw ex
91
96
end TraceSyntax
You can’t perform that action at this time.
0 commit comments