W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: [WebIDL] Exceptions

From: John J. Barton <johnjbarton@johnjbarton.com>
Date: Wed, 06 Jul 2011 20:50:53 -0700
Message-ID: <4E152D1D.5040509@johnjbarton.com>
To: public-webapps@w3.org
On 7/6/2011 6:06 PM, Allen Wirfs-Brock wrote:
>
> I'd much prefer to see code that looks like:
>       try {doSomeDOMStuff() }
>       catch (e) {
>          switch (e.name) {
>               case "NoNotificationAllowedError": ...; break;
>               case "HierarchyRequestError": ...; break;
>               default: throw e
>            }
>       }
Any work with DOM API (at least in Firefox) makes even this case 
impractical.  You'll be luck if the exception has *any* meaningful content.

jjb
Received on Thursday, 7 July 2011 03:51:11 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:46 GMT