Re: [File API] Issue 182 about OperationNotAllowed

On Mon, Oct 3, 2011 at 11:54 PM, Anne van Kesteren <annevk@opera.com> wrote:
> On Tue, 04 Oct 2011 00:59:18 +0200, Jonas Sicking <jonas@sicking.cc> wrote:
>>
>> Yup. I do wonder if we should introduce a DOMError class which can be
>> reused in various cases which need APIs like this. IndexedDB could
>> also use it and I seem to recall that HTML5 does too.
>
> I could certainly introduce a DOMError interface with a name and a message
> attribute. For the APIs that want to provide the same information
> asynchronous as they do synchronous through exceptions that makes sense.
> Would that work?

Yup, that'd work.

Another option which just occurred to me is to actually use
DOMException objects. The ECMAScript error objects don't actually have
anything "exception specific" about them. DOMException only does so by
name of the interface.

Either way is fine with me.

/ Jonas

Received on Tuesday, 4 October 2011 08:44:41 UTC