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

RE: Should Exceptions be Errors in the ECMAScript bindings?

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Wed, 18 Apr 2012 19:09:48 +0000
To: Erik Arvidsson <arv@chromium.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <9768D477C67135458BF978A45BCF9B38382F04DA@TK5EX14MBXW604.wingroup.windeploy.ntdev.microsoft.com>
>-----Original Message-----
>From: arv@google.com [mailto:arv@google.com] On Behalf Of Erik Arvidsson
>
>I assume this has been covered before but I could not find any
>previous discussion.
>
>Would it make sense to make DOM exceptions be Error objects in the
>ECMAScript bindings? The reason this came up (again) is that some
>engines provide stack traces on Error objects and developers also want
>this on DOMExceptions. If DOMExceptions where real Errors engines
>would get that feature for "free".

I believe that WebIDL currently requires that DOM exceptions inherit from the ES "Error" prototype. This effectively makes them Errors for most purposes.
Received on Wednesday, 18 April 2012 19:10:28 UTC

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