Skip to content
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

Debugger doesn't break on unhandled exceptions from rethrow #36907

Closed
DanTup opened this issue May 9, 2019 · 0 comments
Closed

Debugger doesn't break on unhandled exceptions from rethrow #36907

DanTup opened this issue May 9, 2019 · 0 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@DanTup
Copy link
Collaborator

DanTup commented May 9, 2019

This might be a dupe of #29550, but I'm not sure since it's a rethrow and there's no finally involved (I think the behaviour of both is unexpected, perhaps questionable).

Given this code:

main() {
  try {
    num.parse('a');
  } on Exception {
    rethrow;
  }
}

If you run with "break on unhandled exceptions", the debugger never breaks, but you get a crash. My interpretation is that the exception being raised by rethrow is unhandled (hence the crash) and should break the debugger.

It is my belief that (at least) JavaScript, C#, Java would all break there.

@mit-mit mit-mit added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label May 14, 2019
@zichangg zichangg self-assigned this May 16, 2019
dart-bot pushed a commit that referenced this issue May 17, 2019
Rethrow should behave the same as throwing from debugger point of view. Thus, notify debugger for possibly pausing on exceptions.

Bug: #36907
Change-Id: I84886fd8f3e1c579f60802aadb9fdaa4e076b6c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102681
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants