Skip to content

Need a way to trap exceptions that reach top-level #8442

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

Closed
dgrove opened this issue Feb 9, 2013 · 5 comments
Closed

Need a way to trap exceptions that reach top-level #8442

dgrove opened this issue Feb 9, 2013 · 5 comments
Labels
closed-duplicate Closed in favor of an existing report

Comments

@dgrove
Copy link
Contributor

dgrove commented Feb 9, 2013

In the browser, it's important to have a way to catch top-level exceptions so that they can be logged to servers.

Not sure if this will wind up being an embedder issue or a language issue.

@gbracha
Copy link
Contributor

gbracha commented Feb 9, 2013

The spec already notes:

    If an uncaught exception is thrown by a running isolate A, A is immediately suspended.

Not terminated, suspended. The non-normative text describes the relation to the embedder, which should get a description of the exception (this is described for compilation errors). It's possible we should make some this text normative and clarify that it applies to uncaught exceptions.

Ultimately, this is the easy part. The key thing is the SMOP, and it seems clear to me that the embedder should deal with this situation. Unless you want resumable exceptions, I don't see why the language runtime would need to do very much.

@jmesserly
Copy link

I don't think "suspended" is the desired behavior for the main browser isolate. The Dartium embedder can't do anything here, because it doesn't know how to talk to web server. This must be handled by application's code. We would like the application to register a handler that can respond to the exception and deal with it.

The case we are concerned with is an exception in the main isolate, such as in an event handler, requestAnimationFrame, setTimeout, etc. It is not always possible to ensure a try-catch on every event handler.

@nex3
Copy link
Member

nex3 commented Feb 11, 2013

I think this is a duplicate of issue #8417.

@jmesserly
Copy link

good call Nathan. Dup'd with your bug


Added Duplicate label.
Marked as being merged into #8147.

@sigmundch
Copy link
Member

(fixed dup reference)


Marked as being merged into #8417.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

5 participants