Fix of uncaughtException should not catch browser exception
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
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?