You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make error reporting resilient to exception thrown while reporting
Previously the added test failed with `1 error reported` but no actual error
message printed, because a stack overflow is thrown while reporting the
original error. This is then caught and handled to emit a RecursionOverflow
error, but that second error is non-sensical and non-sensical errors are only
printed if `hasErrors` returns false.
We fix this by deferring incrementing the error count (and therefore having
`hasErrors` return true) until after having displayed the error. We also defer
calling `markReported` otherwise the second error will also be suppressed. A
similar change is necessary in our testing infrastructure to keep the error
count is coherent.
0 commit comments