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

Fix of uncaughtException should not catch browser exception #17

Open
wants to merge 1 commit into
base: nw12
Choose a base branch
from

Conversation

ghostoy
Copy link
Member

@ghostoy ghostoy commented Mar 25, 2015

In node.js, error caught by uncaughtException means application crash. But errors generated by libraries written for browser doesn't. Usually user can ignore those browser generated errors.

This patch only forward exceptions created in node context to uncaughtException (fix nwjs/nw.js#3061).

Limitation: non-object exceptions will not be passed to uncaughtException since I can't tell if a number or a boolean is generated from node context

@matthew-dean
Copy link

But errors generated by libraries written for browser doesn't.

I think that's an unsafe assumption. It's assuming the browser context doesn't have critical processes for app operation. If it only catches Node context, then how do you catch for all uncaught exceptions, regardless of context?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

uncaughtException catches exceptions from browser context
2 participants