Documentación offline JavaScript main

SuppressedError: error

main Documentación oficial Licencia CC-BY-SA-2.5Descargado el 2026-08-02

En esta página

The error data property of a {{jsxref("SuppressedError")}} instance contains a reference to the error that results in the suppression.

Value#

Any value. Like {{jsxref("Error/cause", "cause")}}, you cannot assume it's an {{jsxref("Error")}} instance, although it usually is the case.

{{js_property_attributes(1, 0, 1)}}

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#

{{Specifications}}

Browser compatibility#

{{Compat}}

See also#