Re: File API exception codes

On Tue, 7 Sep 2010, Arun Ranganathan wrote:
> 
> It *does* seems sensible to use DOMException instead of FileException in 
> the synchronous case (on WebWorkers).  But in the asynchronous case, 
> DOMError seems a bit janky 
> (http://www.w3.org/TR/DOM-Level-3-Core/core.html#ERROR-Interfaces-DOMError).  
> So the DOMError exposes a DOMObject that is the affiliated 
> relatedException?  That seems a bit harder than a mere FileError, but 
> I'm willing to go with DOMError here as well.
> 
> I find what HTML5 does for adding exception codes pretty attractive.  
> And reusing DOMException and DOMError would alleviate the naming issue 
> (BlobException/BlobError vs. FileException/FileError).  I'm just 
> concerned that DOMError seems awkward -- is anyone working on it?

What I did in Web SQL Database is just have a SQLException interface for 
the sync case an an essentially identical SQLError interface for the async 
case, without any concern for keeping the numbers from clashing with 
DOMException (since they were on entirely different interfaces).

   http://dev.w3.org/html5/webdatabase/#errors-and-exceptions

I agree that DOMError is a mess. We should probably assume it doesn't 
exist and start over, unless it's used anywhere.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 8 September 2010 03:34:11 UTC