-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Need a global error handler primitive in the VM #9273
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
Comments
Marked this as blocking #5958. |
Also see issue #9274. |
Yes, please. :) |
My understanding is that developers want a causal chain that looks like a stack trace, even though it may bridge several stacks. Each isolate would be displayed as a stack frame from the code that spawned it, so an unhandled exception in a set of deeply nested async calls can be traced back to the code that created it. I suggested having each spawn operation create a stack trace and store it in the new isolate, but that was rejected as requiring too much overhead, impacting memory footprint and performance. |
@tom, that's correct, we'd like to be able to walk from the async exception back to the original source of the error. |
FWIW, this matters during development and debugging time. So, making this a checked-mode only behavior seems quite sufficient. |
This bug is about a simple primitive in the VM where global errors can be dispatched to. All other developer scenarios can be built on top once this primitive is implemented. |
In agreement with Ivan (comment 8). This is just about a (hidden) primitive from the VM.
In any case: getting something and iterating on it would be already a good start. |
Revision 16186 (https://code.google.com/p/dart/source/detail?r=16186) added support for the VM calling a "_unhandledExceptionCallback(IsolateUnhandledException e)" function in the main library, if it exists. Attached is an example Ivan wrote, demonstrating its use. This can easily be changed to call something similar in the async library. Attachment: |
Removed the owner. |
Removed Priority-Medium label. |
Is this still a valid request? I assume the libraries have moved a long way from this, correct? Set owner to @floitschG. |
I'm not sure, yet. |
Set owner to @lrhn. |
Added AssumedStale label. |
We need a way to set the global error-handler. For now just having a private VM specific implementation is good enough. We can then provide a public API on top of it.
The text was updated successfully, but these errors were encountered: