Adds an additional options parameter to the Error() constructor with a cause property, the value of which will be assigned to the error instances as a property. This allows errors to be chained without unnecessary and overelaborate formalities on wrapping the errors in conditions.

Specification

Editor's draft

Status in Chromium

Blink>JavaScript>Language


Enabled by default (tracking bug) in:

  • Chrome for desktop release 93
  • Chrome for Android release 93
  • Android WebView release 93

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • No signal
  • No signal
  • No signal
  • No signals

Owner

Search tags

JavaScript, Error,

Last updated on 2021-07-27