docs.rodeo

MDN Web Docs mirror

DOMException

{{APIRef("DOM")}} {{AvailableInWorkers}} 

The DOMException interface represents an abnormal event (called an exception) that occurs as a result of calling a method or accessing a property of a web API. This is how error conditions are described in web APIs.

Each exception has a name, which is a short “PascalCase”-style string identifying the error or abnormal condition.

DOMException is a {{Glossary("Serializable object")}} , so it can be cloned with {{DOMxRef("Window.structuredClone", "structuredClone()")}}  or copied between Workers using {{domxref("Worker.postMessage()", "postMessage()")}} .

Constructor

Instance properties

Error names

Common error names are listed here. Some APIs define their own sets of names, so this is not necessarily a complete list.

Note that the following deprecated historical errors don’t have an error name but instead have only a legacy constant code value and a legacy constant name:

[!NOTE] Because historically the errors were identified by a numeric value that corresponded with a named variable defined to have that value, some of the entries below indicate the legacy code value and constant name that were used in the past.

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN