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
VM should pause on the throwing exceptions in futures, which will not be handled by any catchError() #15120
Comments
This comment was originally written by Erik.G...@gmail.com Step 1 should be "Set the editor preference Run and Debug -> Break On Exceptions to 'Uncaught'" |
Added Area-Editor, Triaged labels. |
Set owner to @devoncarew. |
I think what's happening here is that the Zone is catching and handling the error. From the POV of the application and the user it's an uncaught exception. From the POV of the debugger it's been caught and handled. We need to reconcile the two viewpoints. Adding Florian (who I think did the zones work) and Matthias to get their thoughts. cc @floitschG. |
Yes. Fwiw browsers have a similar issue with onerror. They consider errors as uncaught, even if the onerror handler returns true. |
This comment was originally written by @mhausner It looks like either we bake the knowledge as to what counts as an uncaught exception into the core VM, or we leave it up to the debugger front-end to determine whether an exception should be considered as uncaught or not. The debugger client can implement this by telling the VM to break on all exceptions, and then determine which ones to show to the user and which ones not. |
Fwiw there could be some interesting logic involved. For example: Here the I'm bringing this up, because I expect this to have some (even if small) influence on the decision where we want to put the logic. |
Issue #16387 has been merged into this issue. |
Removed this from the 1.6 milestone. |
Removed Oldschool-Milestone-1.6 label. |
Added Editor-Debugging label. |
cc @scheglov. |
How can the debugger client know if there is any chained catchError() invocation somewhere in the other library that calls some function? Or that its test() function will actually allow to handle it? It seems that it would require to do much Dart code analysis, which mean that it naturally belongs to VM, not to the debugger client. import 'dart:async'; main() { Future useFuture() { cc @devoncarew. |
I only see the following (imperfect) solution: Note: even then it is very imperfect, since users can add error-handlers after a call to completeError. |
This issue was originally filed by Erik.Gri...@gmail.com
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Expected: The editor should break at the source of the exception (Uncaught DataCloneError).
Actual: The editor continues on.
What version of the product are you using? On what operating system?
Dart Editor version 1.0.0_r30187 (DEV)
Dart SDK version 1.0.0.3_r30187
Please provide any additional information below.
I suspect what's going on here is the UncaughtDataCloneError is an unhanded async error in the sdk or dart libraries. So from the the editors perspective, it's not "uncaught". I think two things need to happen.
The text was updated successfully, but these errors were encountered: