SuppressedError: suppressed
The suppressed
data property of a SuppressedError
instance contains a reference to the original error that got suppressed because a new error was generated while handling it.
Value
Examples
Using suppressed
js
try {
throw new SuppressedError(
new Error("New error"),
new Error("Original error"),
"Hello",
);
} catch (e) {
console.log(e.suppressed); // Error: "Original error"
}
Specifications
No specification found
No specification data found for javascript.builtins.SuppressedError.suppressed
.
Check for problems with this page or contribute a missing spec_url
to mdn/browser-compat-data. Also make sure the specification is included in w3c/browser-specs.