W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2010

Re: File API exception codes

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 6 Sep 2010 19:27:22 +0000 (UTC)
To: Nathan <nathan@webr3.org>
cc: public-webapps <public-webapps@w3.org>, arun@mozilla.com, Anne van Kesteren <annevk@opera.com>, ericu@google.com
Message-ID: <Pine.LNX.4.64.1009061912020.27869@ps20323.dreamhostps.com>
On Mon, 6 Sep 2010, Nathan wrote:
> Just noticed that File API specifies NOT_READABLE_ERR as code 24, 
> whereas 24 is already used for DATA_CLONE_ERR 
> http://dev.w3.org/html5/spec/common-dom-interfaces.html#data_clone_err
> Not sure if this is an issue or not, but a heads up regardless.

I've updated HTML5 to use 25 for DATA_CLONE_ERR. We're keeping an informal 
registry of codes here:


I've added NOT_READABLE_ERR and ENCODING_ERR to the wiki.

Why does File API use FileError/FileException and not DOMException? If it 
doesn't use DOMException, these don't actually clash, and it seems weird 
that we would use the same numbers. Can this be fixed?

Same question for the File System and File Writer APIs.

To add exception codes, just do something like what HTML5 does:

  [Supplemental] exception DOMException {
    const unsigned short URL_MISMATCH_ERR = 21;
    const unsigned short QUOTA_EXCEEDED_ERR = 22;
    const unsigned short DATA_CLONE_ERR = 25;

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 6 September 2010 19:27:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:11 UTC