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

Re: File API exception codes

From: Eric Uhrhane <ericu@google.com>
Date: Tue, 7 Sep 2010 17:59:07 -0700
Message-ID: <AANLkTimOAAGp-Hms+GUTeHr-S_VztM0x_kucOS4wyg=q@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: Nathan <nathan@webr3.org>, public-webapps <public-webapps@w3.org>, arun@mozilla.com, Anne van Kesteren <annevk@opera.com>
On Mon, Sep 6, 2010 at 12:27 PM, Ian Hickson <ian@hixie.ch> wrote:
> 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:
>
>   http://wiki.whatwg.org/wiki/Exception_Codes
>
> 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?

I'd be happy to use DOMException in FileWriter and FileSystem if Arun
switched his API over.

> 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 Wednesday, 8 September 2010 01:00:28 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:40 GMT