File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import java.io.{BufferedReader, PrintWriter}
1515import scala .annotation .internal .sharable
1616import scala .collection .mutable
1717import core .Decorators .em
18+ import core .handleRecursive
1819
1920object Reporter {
2021 /** Convert a SimpleReporter into a real Reporter */
@@ -155,7 +156,12 @@ abstract class Reporter extends interfaces.ReporterResult {
155156 addUnreported(key, 1 )
156157 case _ =>
157158 if ! isHidden(dia) then // avoid isHidden test for summarized warnings so that message is not forced
158- withMode(Mode .Printing )(doReport(dia))
159+ try
160+ withMode(Mode .Printing )(doReport(dia))
161+ catch case ex : Throwable =>
162+ // #20158: Don't increment the error count, otherwise we might suppress
163+ // the RecursiveOverflow error and not print any error at all.
164+ handleRecursive(" error reporting" , dia.message, ex)
159165 dia match {
160166 case w : Warning =>
161167 warnings = w :: warnings
You can’t perform that action at this time.
0 commit comments