-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Emit unhandled exception info via a single console.error call. Fixes #20280 #20907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| // runtime will do if it encounters a truly severe error outside the Blazor | ||
| // code paths. | ||
| Console.Error.WriteLine(formattedMessage); | ||
| _jsRuntime.InvokeVoid("Blazor._internal.dotNetCriticalError", formattedMessage); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unmarshalled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that's a good idea. Most times it will make no difference, but I guess if the exception is something like "S.T.J. is somehow completely broken" then we don't want to rely on S.T.J. during the reporting of that error.
Done.
|
Changed around the base branches so that the build on this can re-kick. I'll monitor this build. |
|
Thanks @captainsafia! I've noticed a bug in the new E2E test in |
219332a to
52afc53
Compare
f1039f5 to
a869ad4
Compare
|
Merging this into the other branch now! |
Previously we used
Console.Error.WriteLine. However this is implemented as the stderr stream, which has no message framing, so the recipient has no way to know how successive lines correspond to the originalConsole.Error.WriteLinecalls. So there's no way of putting the lines into groups, hence they each are treated as separateconsole.errorcalls, hence each line emits its own separate stack trace, leading to #20280.The fix is to have a separate dedicated channel for unhandled exception info.