Spec-Zone.ru › JavaScript

SuppressedError: error

Baseline Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The error data property of a SuppressedError instance contains a reference to the error that results in the suppression.

Value

Any value. Like cause, you cannot assume it's an Error instance, although it usually is the case.

Property attributes of SuppressedError: error
Writable yes
Enumerable no
Configurable yes

Examples

Using error

try {
  throw new SuppressedError(
    new Error("New error"),
    new Error("Original error"),
    "Hello",
  );
} catch (e) {
  console.log(e.error); // Error: "New error"
}

Specifications

Specification
ECMAScript Async Explicit Resource Management
# sec-suppressederror

Browser compatibility

Desktop Mobile Server
Chrome Edge Firefox Opera Safari Chrome Android Firefox for Android Opera Android Safari on iOS Samsung Internet WebView Android WebView on iOS Bun Deno Node.js
error
134
134
141
119
preview
134
141
88
No
29.0
134
No
1.0.23
2.2.10
No

See also

  • Control flow and error handling guide
  • SuppressedError
  • Error: cause

© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SuppressedError/error

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API