W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

Re: Constructible Exceptions

From: Cameron McCormack <cam@mcc.id.au>
Date: Sat, 24 Mar 2012 11:56:16 +1100
Message-ID: <4F6D1BB0.6000602@mcc.id.au>
To: Marcos Caceres <w3c@marcosc.com>
CC: Marcos Caceres <marcosscaceres@gmail.com>, public-script-coord <public-script-coord@w3.org>
Marcos Caceres:
> The use case for throwing custom WebIDL exceptions is to be able to
> implement WebIDL interfaces directly in JavaScript (when allowed by
> the presence of [Constructor])…. though my real use case is to be
> able to construct DOMExceptions in JS, I'll need to take that up with
> DOM4.

This is already possible, because exception interface objects are 
required to be function objects with a [[Call]] behaviour that 
constructs the exception.  So there is no need for [Constructor] on them.
Received on Saturday, 24 March 2012 00:56:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:05 UTC