W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

Re: [webidl] DOMString

From: Oliver Hunt <oliver@apple.com>
Date: Wed, 22 Apr 2009 00:01:32 -0700
Cc: WebApps WG <public-webapps@w3.org>
Message-Id: <DC8C5C9B-5E2C-472B-9B15-6DDB2C04308B@apple.com>
To: Cameron McCormack <cam@mcc.id.au>
Conceivably the language could be a relatively simple and broad  
statement along the lines of:
"Any type conversions needed for a language binding should occur  
before an API function is called, if a type conversion fails for any  
reason the call should be aborted"

However this doesn't address the issue of callbacks that throw  
exceptions, or returns incorrect types leading to an exception on type  
conversion, etc, etc


On Apr 21, 2009, at 11:46 PM, Cameron McCormack wrote:

> Hi Garrett.
> Cameron McCormack:
>>> 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).
> Garrett Smith:
>> I'm not sure, but I think you might have meant OutOfMemoryError.
> Yep that’s what I meant.
>> All Errors are unchecked in Java.
> Indeed.
>> 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)
> Yeah, I’ve made those exceptions extend RuntimeException.
>> Which languages don't throw unchecked exceptions?
> C, for example, which doesn’t have exceptions at all.
>>> 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?
> Perhaps; I don’t know Obj-C so I couldn’t say.
> -- 
> Cameron McCormack ≝ http://mcc.id.au/
Received on Wednesday, 22 April 2009 07:02:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:53 UTC