SuppressedError: suppressed
Die suppressed
Dateneigenschaft einer Instanz von SuppressedError
enthält einen Verweis auf den ursprünglichen Fehler, der unterdrückt wurde, weil bei dessen Behandlung ein neuer Fehler erzeugt wurde.
Wert
Beispiele
Verwendung von suppressed
js
try {
throw new SuppressedError(
new Error("New error"),
new Error("Original error"),
"Hello",
);
} catch (e) {
console.log(e.suppressed); // Error: "Original error"
}
Spezifikationen
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.