-
Notifications
You must be signed in to change notification settings - Fork 72
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
Structured cloning of errors #165
Comments
Fwiw, I think this is a good idea. Right now exception information can sort of make it out of a worker via "error" events on it, but when Promises are involved there's no good way I can see to propagate out error status. If the code could just |
I also think this is a good idea, including the choice of option one with @domenic's added comment. |
This is done. |
I have sent an intent-to-ship for this feature to blink-dev. |
Thanks all! I think the conclusion here is |
Request for Mozilla Position on an Emerging Web Specification
Other information
This is a proposal to make various error types structured cloneable, i.e. integrate them into the structured serialize/deserialize algorithms. In particular, this is done for DOMException in the fashion of any other Web IDL interface (via [Serializable]), and is done for ECMAScript's built-in error types in a way similar to other ECMAScript built-ins like Map or Set (as part of the structured (de)serialization algorithms in HTML).
There was some discussion on the best way to handle the ECMAScript built-in error types, as they are not separately branded (i.e. there is no internal state that distinguishes TypeError from URIError); see tc39/ecma262#1389 for that discussion.
@bzbarsky brought up some points about (de)serialization of the un-speced but de-facto
stack
property on errors. We've discussed and decided with option 1 in whatwg/html#4268 (comment), and I'll be updating the spec PRs shortly./cc @yutakahirano
The text was updated successfully, but these errors were encountered: