W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Another case of wanting to a test like isArray, this time on exceptions

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 3 Sep 2013 07:21:39 +0100
Message-ID: <CADnb78iPdxRLCsBazXzJya9-BsUoKujcwOHctxBUecCG=rW6XA@mail.gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>, dteller@mozilla.com
On Tue, Sep 3, 2013 at 2:49 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> I feel like a broken record, but...
> https://bugzilla.mozilla.org/show_bug.cgi?id=911799 has a use case for
> detecting what sort of exception you have: TypeError, StopIteration, or
> whatnot.  Doing this when the exception was thrown in code running in a
> different global is not really possible right now, right?
> We may want some sort of mechanism on exceptions to ask them what sorts of
> exceptions they are.

>From what I heard the recommend way of doing this is checking the name
property. It's not entirely clear to me if that'll be true going
forward though since I believe there are proposals to branch on
exception type within try/catch.

Received on Tuesday, 3 September 2013 06:22:07 UTC

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