On Tue, Apr 21, 2009 at 8:30 PM, Cameron McCormack <c...@mcc.id.au> wrote:
> Cameron McCormack:
>> > Seems reasonable to state that. I’ve added a note to do that when
>> > I get some time to allocate to editing Web IDL again.
>
> Oliver Hunt:
>> I actually thought about this some more, and realised i'm not entirely
>> sure this should be part of webidl as it seems a little too language
>> specific.  Eg. WebKit also provides an objective-c interface to the DOM
>> to application developers, allowing them to interact with a webpage (or
>> other content) through the DOM directly from their application code.
>
> It’s only the ECMAScript language binding that uses the ES ToString etc.
> algorithms, so I think it would be fine to define in the ES language
> binding section that exceptions thrown when converting an IDL value to
> an ECMAScript value or vice versa will propagate to whatever invoked
> that conversion.
>
> We could certainly add similar language for the Java language binding
> section too, though I think there’s less scope for those conversions to
> throw exceptions (maybe ones like OutOfMemoryException).

I'm not sure, but I think you might have meant OutOfMemoryError.

All Errors are unchecked in Java.

Java also has unchecked exceptions, though unlike Errors there are
exceptions that are checked at compile-time (checked exceptions).

All of the dom exceptions are runtime exceptions. (TYPE_MISMATCH_ERR,
for example)

> exception propagation behaviour is going to be somewhat language
> specific, since some language bindings may not even have exceptions as
> part of the language, so I think that means that it should be defined
> separately for each language.
>

Which languages don't throw unchecked exceptions?

> Until (unless) somebody writes up a Web IDL language binding for
> Objective-C, the best you can hope for is for Obj-C implementations to
> do something “sensible”.

Like throw a runtime error?

Garrett

Reply via email to