File tree 1 file changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/reporting
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}
15
15
import scala .annotation .internal .sharable
16
16
import scala .collection .mutable
17
17
import core .Decorators .em
18
+ import core .handleRecursive
18
19
19
20
object Reporter {
20
21
/** Convert a SimpleReporter into a real Reporter */
@@ -155,7 +156,12 @@ abstract class Reporter extends interfaces.ReporterResult {
155
156
addUnreported(key, 1 )
156
157
case _ =>
157
158
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)
159
165
dia match {
160
166
case w : Warning =>
161
167
warnings = w :: warnings
You can’t perform that action at this time.
0 commit comments