blink icon indicating copy to clipboard operation
blink copied to clipboard

Fix of uncaughtException should not catch browser exception

Open ghostoy opened this issue 10 years ago • 1 comments

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

ghostoy avatar Mar 25 '15 12:03 ghostoy

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?

matthew-dean avatar Oct 29 '15 15:10 matthew-dean