← Back to release summary

Error serialization

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 77)
Intent stage
Evaluate readiness to ship

Summary

Enables serialization of errors, specifically, DOMException, Error, EvalError, RangeError, ReferenceError, SyntaxError, TypeError, and URIError. An example of where this capability may be used is to pass an Error to a worker using PostMessage().

Motivation

The primary motivation is Transferable Streams. For example, when we see a read error, we need to pass the error to the remote end.

Standards & signals

Docs: https://github.com/whatwg/html/pull/4665 https://github.com/heycam/webidl/pull/732

Explainers: https://github.com/whatwg/html/issues/4268

View on chromestatus.com