Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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