Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 891045 of DOMError

  • Revision slug: Web/API/DOMError
  • Revision title: DOMError
  • Revision id: 891045
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment fix compat parsing

Revision Content

{{ APIRef("DOM") }}

The DOMError interface describes an error object that contains an error name.

Properties

{{domxref("DOMError.name")}} {{readOnlyInline}}
Returns a {{ domxref("DOMString") }} representing one of the error type names (see below).

Error types

Type Description
IndexSizeError The index is not in the allowed range (e.g. thrown in a {{ domxref("range") }} object).
HierarchyRequestError The node tree hierarchy is not correct.
WrongDocumentError The object is in the wrong {{ domxref("document") }}.
InvalidCharacterError The string contains invalid characters.
NoModificationAllowedError The object can not be modified.
NotFoundError The object can not be found here.
NotSupportedError The operation is not supported
InvalidStateError The object is in an invalid state.
SyntaxError The string did not match the expected pattern.
InvalidModificationError The object can not be modified in this way.
NamespaceError The operation is not allowed by Namespaces in XML
InvalidAccessError The object does not support the operation or argument.
TypeMismatchError The type of the object does not match the expected type.
SecurityError The operation is insecure.
NetworkError A network error occurred.
AbortError The operation was aborted.
URLMismatchError The given URL does not match another URL.
QuotaExceededError The quota has been exceeded.
TimeoutError The operation timed out.
InvalidNodeTypeError The node is incorrect or has an incorrect ancestor for this operation.
DataCloneError The object can not be cloned.

Specifications

Specification Status Comment
{{SpecName('DOM4', '#interface-domerror', 'DOMError')}} {{Spec2('DOM4)}} Initial definition.

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support {{CompatUnknown}} 12.0 {{CompatUnknown}} {{CompatUnknown}} {{CompatVersionUnknown}}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support {{CompatUnknown}} 12.0 {{CompatUnknown}} {{CompatUnknown}} {{CompatUnknown}}

See also

  • {{ domxref("DOMException") }}

Revision Source

<p>{{ APIRef("DOM") }}</p>

<p>The <strong><code>DOMError</code></strong> interface describes an error object that contains an error name.</p>

<h2 id="Properties">Properties</h2>

<dl>
 <dt>{{domxref("DOMError.name")}} {{readOnlyInline}}</dt>
 <dd>Returns a {{ domxref("DOMString") }} representing one of the error type names (see below).</dd>
</dl>

<h2 id="Error_types">Error types</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <td>Type</td>
   <td>Description</td>
  </tr>
  <tr>
   <td><code>IndexSizeError</code></td>
   <td>The index is not in the allowed range (e.g. thrown in a {{ domxref("range") }} object).</td>
  </tr>
  <tr>
   <td><code>HierarchyRequestError</code></td>
   <td>The node tree hierarchy is not correct.</td>
  </tr>
  <tr>
   <td><code>WrongDocumentError</code></td>
   <td>The object is in the wrong {{ domxref("document") }}.</td>
  </tr>
  <tr>
   <td><code>InvalidCharacterError</code></td>
   <td>The string contains invalid characters.</td>
  </tr>
  <tr>
   <td><code>NoModificationAllowedError</code></td>
   <td>The object can not be modified.</td>
  </tr>
  <tr>
   <td><code>NotFoundError</code></td>
   <td>The object can not be found here.</td>
  </tr>
  <tr>
   <td><code>NotSupportedError</code></td>
   <td>The operation is not supported</td>
  </tr>
  <tr>
   <td><code>InvalidStateError</code></td>
   <td>The object is in an invalid state.</td>
  </tr>
  <tr>
   <td><code>SyntaxError</code></td>
   <td>The string did not match the expected pattern.</td>
  </tr>
  <tr>
   <td><code>InvalidModificationError</code></td>
   <td>The object can not be modified in this way.</td>
  </tr>
  <tr>
   <td><code>NamespaceError</code></td>
   <td>The operation is not allowed by Namespaces in XML</td>
  </tr>
  <tr>
   <td><code>InvalidAccessError</code></td>
   <td>The object does not support the operation or argument.</td>
  </tr>
  <tr>
   <td><code>TypeMismatchError</code></td>
   <td>The type of the object does not match the expected type.</td>
  </tr>
  <tr>
   <td><code>SecurityError</code></td>
   <td>The operation is insecure.</td>
  </tr>
  <tr>
   <td><code>NetworkError</code></td>
   <td>A network error occurred.</td>
  </tr>
  <tr>
   <td><code>AbortError</code></td>
   <td>The operation was aborted.</td>
  </tr>
  <tr>
   <td><code>URLMismatchError</code></td>
   <td>The given URL does not match another URL.</td>
  </tr>
  <tr>
   <td><code>QuotaExceededError</code></td>
   <td>The quota has been exceeded.</td>
  </tr>
  <tr>
   <td><code>TimeoutError</code></td>
   <td>The operation timed out.</td>
  </tr>
  <tr>
   <td><code>InvalidNodeTypeError</code></td>
   <td>The node is incorrect or has an incorrect ancestor for this operation.</td>
  </tr>
  <tr>
   <td><code>DataCloneError</code></td>
   <td>The object can not be cloned.</td>
  </tr>
 </tbody>
</table>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('DOM4', '#interface-domerror', 'DOMError')}}</td>
   <td>{{Spec2('DOM4)}}</td>
   <td>Initial definition.</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>Internet Explorer</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>12.0</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatVersionUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE Mobile</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatUnknown}}</td>
   <td>12.0</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
   <td>{{CompatUnknown}}</td>
  </tr>
 </tbody>
</table>
</div>

<h2>See also</h2>

<ul>
 <li>{{ domxref("DOMException") }}</li>
</ul>
Revert to this revision