W3C home > Mailing lists > Public > public-media-capture@w3.org > April 2013

Re: error classes

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Mon, 15 Apr 2013 17:23:55 +0200
Message-ID: <516C1B8B.1020005@ericsson.com>
To: Jim Barnett <Jim.Barnett@genesyslab.com>
CC: "public-media-capture@w3.org" <public-media-capture@w3.org>
On 2013-04-12 16:40, Jim Barnett wrote:
> In our previous discussions of error handling, I think that we agreed
> that we would use exceptions for errors that were immediately detectable
> (argument type mismatches and the like).  Someone (Adam?) said that the
> IDL will create some of these for us automatically.  If thatís the case,
> it would be great if he could send an explanation/link around so that we
> can understand exactly what we get for free.

WebIDL has mechanisms for converting JavaScript (ECMAScript) values to 
their corresponding WebIDL values [1].

If we, for example, describe a function with arguments in WebIDL, we 
don't have to specify how the arguments are converted (and possibly 
throw type errors). All that is taken care of before the specific 
instructions of our function are executed.

[1] http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping
Received on Monday, 15 April 2013 15:24:21 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:16 UTC