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 28820 of FileError

  • Revision slug: DOM/FileError
  • Revision title: FileError
  • Revision id: 28820
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment update for bug 732769; 72 words added, 2 words removed

Revision Content

{{ obsolete_header() }}

Represents an error that occurs while using the {{ domxref("FileReader") }} interface. Obsolete per latest specification. Use {{ domxref("DOMError") }} instead.

Properties

Property Type Description
code unsigned short
The error code.

Error codes

Constant Value Description
ABORT_ERR 3 The file operation was aborted, probably due to a call to the FileReader abort() method.
ENCODING_ERR 5 The file data cannot be accurately represented in a data URL.
NOT_FOUND_ERR 1 File not found.
NOT_READABLE_ERR 4 File could not be read.
SECURITY_ERR 2 The file could not be accessed for security reasons.

Gecko-specific implementation notes

  • The FileError interface has been removed starting with Gecko 13 {{ geckoRelease("13.0") }}. Instead the more general {{ domxref("DOMError") }} interface is used and returned by {{ domxref("FileReader", "FileReader.error") }}.

See also

  • {{ domxref("FileReader") }}
  • {{ domxref("File") }}
  • {{ domxref("Blob") }}
  • {{ spec("https://www.w3.org/TR/FileAPI/#ErrorAndException", "Specification: FileAPI Errors and exception", "WD") }}

{{ languages( {"zh-cn": "zh-cn/DOM/FileError" } ) }}

Revision Source

<p>{{ obsolete_header() }}</p>
<p>Represents an error that occurs while using the {{ domxref("FileReader") }} interface. Obsolete per latest specification. Use {{ domxref("DOMError") }} instead.</p>
<h2 id="Properties">Properties</h2>
<table class="standard-table"> <tbody> <tr> <td class="header">Property</td> <td class="header">Type</td> <td class="header">Description</td> </tr> <tr> <td><code>code</code></td> <td><code>unsigned short<br> </code></td> <td>The <a href="/en/nsIDOMFileError#Error_codes" title="en/nsIDOMFileError#Error codes">error code</a>.</td> </tr> </tbody>
</table>
<h2 id="Error_codes">Error codes</h2>
<table class="standard-table"> <thead> <tr> <td class="header">Constant</td> <td class="header">Value</td> <td class="header">Description</td> </tr> </thead> <tbody> <tr> <td><code>ABORT_ERR</code></td> <td>3</td> <td>The file operation was aborted, probably due to a call to the <code>FileReader</code> <code>abort()</code> method.</td> </tr> <tr> <td><code>ENCODING_ERR</code></td> <td>5</td> <td>The file data cannot be accurately represented in a data URL.</td> </tr> <tr> <td><code>NOT_FOUND_ERR</code></td> <td>1</td> <td>File not found.</td> </tr> <tr> <td><code>NOT_READABLE_ERR</code></td> <td>4</td> <td>File could not be read.</td> </tr> <tr> <td><code>SECURITY_ERR</code></td> <td>2</td> <td>The file could not be accessed for security reasons.</td> </tr> </tbody>
</table>
<h3 id="Gecko-specific_implementation_notes">Gecko-specific implementation notes</h3>
<ul> <li>The FileError interface has been removed starting with Gecko 13 {{ geckoRelease("13.0") }}. Instead the more general {{ domxref("DOMError") }} interface is used and returned by {{ domxref("FileReader", "FileReader.error") }}.</li>
</ul>
<h2 id="See_also">See also</h2>
<ul> <li>{{ domxref("FileReader") }}</li> <li>{{ domxref("File") }}</li> <li>{{ domxref("Blob") }}</li> <li>{{ spec("https://www.w3.org/TR/FileAPI/#ErrorAndException", "Specification: FileAPI Errors and exception", "WD") }}</li>
</ul>
<p>{{ languages( {"zh-cn": "zh-cn/DOM/FileError" } ) }}</p>
Revert to this revision