-
Notifications
You must be signed in to change notification settings - Fork 13
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
How to deal with something like UncaughtException
?
#29
Comments
Can you give some examples of exceptions that do not come from |
function test() {
throw new Error('hello');
}
test(); |
maybe use something like
|
That would imply, in a browser, an "error" event on the document, I think. Do browsers have an event for this? |
https://developer.mozilla.org/en-US/docs/Web/API/Window/error_event |
ah ok, so then it’s already an event on the global - that seems like something that should come for free with event emitters? |
I think yes. Not only for this event. I think we shoud collect and specify all available events in globalScope of Winter. e.g. install / activate / unhandedrejection / error, etc. |
In general, I think it's better (standards wise for new platforms) to use |
Since we're discussing https://html.spec.whatwg.org/multipage/webappapis.html#errorevent |
I don't think Node.js is interested in this if we're not shipping Also, Deno for example does something different from browsers (fires "error" for unhandled rejections). |
For exceptions from
Promise
, we can simply useunhandledrejection
. But how about exceptions that not come fromPromise
? Is there any way to specify the behavior?The text was updated successfully, but these errors were encountered: