mozilla

Revision 28816 of FileError

  • Revision slug: DOM/FileError
  • Revision title: FileError
  • Revision id: 28816
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment clean up a bit; 48 words added, 1 words removed

Revision Content

Represents an error that occurs while using the {{ domxref("FileReader") }} interface.

Properties

Property Type Description
code unsigned short
The error code.

Error codes

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

See also

  • {{ domxref("FileReader") }}
  • {{ domxref("File") }}
  • {{ domxref("Blob") }}
  • {{ spec("http://www.w3.org/TR/FileAPI/#FileErrorInterface", "Specification: FileAPI FileError", "WD") }}

Revision Source

<p>Represents an error that occurs while using the {{ domxref("FileReader") }} interface.</p>
<h2 name="Attributes">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>Error codes</h2>
<table class="standard-table"> <tbody> <tr> <td class="header">Constant</td> <td class="header">Value</td> <td class="header">Description</td> </tr> <tr> <td><code>NOT_FOUND_ERR</code></td> <td>8</td> <td>File not found.</td> </tr> <tr> <td><code>NOT_READABLE_ERR</code></td> <td>24</td> <td>File could not be read.</td> </tr> <tr> <td><code>SECURITY_ERR</code></td> <td>18</td> <td>The file could not be accessed for security reasons.</td> </tr> <tr> <td><code>ABORT_ERR</code></td> <td>20</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>26</td> <td>The file data cannot be accurately represented in a data URL.<em><br> </em></td> </tr> </tbody>
</table>
<h2>See also</h2>
<ul> <li>{{ domxref("FileReader") }}</li> <li>{{ domxref("File") }}</li> <li>{{ domxref("Blob") }}</li> <li>{{ spec("http://www.w3.org/TR/FileAPI/#FileErrorInterface", "Specification: FileAPI FileError", "WD") }}</li>
</ul>
Revert to this revision