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:
7474 while logctx.reporter.isInstanceOf [StoreReporter ] do logctx = logctx.outer
7575 def margin = ctx.base.indentTab * ctx.base.indent
7676 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 ) =
7878 if ! finalized then
7979 ctx.base.indent -= 1
80- doLog(s " $margin${trailing(result)}$note " )
80+ doLog(s " $margin$msg " )
8181 finalized = true
8282 try
8383 doLog(s " $margin$leading" )
8484 ctx.base.indent += 1
8585 val res = op
86- finalize(res, " " )
86+ finalize(trailing( res) )
8787 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
9196end TraceSyntax
You can’t perform that action at this time.
0 commit comments