A way of explicitly reporting exceptions
domenic at domenicdenicola.com
Mon Jul 21 12:12:00 PDT 2014
From: Boris Zbarsky [mailto:bzbarsky at MIT.EDU]
> On 6/24/14, 9:51 AM, Domenic Denicola wrote:
>> I'd be interested in collaborating on designing such a language extension.
> I think I would too; I'm just not sure about availability.
For posterity, [I tried to replicate this functionality using recursive try-finally]. It does not quite work: Chrome reports 1, 2, error, 3 for EventTarget, with 1, 2, 3, error for my custom try-finally version.
(Firefox seems to report error, 1, 2, 3 in both cases, which I am guessing is a result of some implementation detail of the console.)
So indeed this is not something you can do with JS as it stands.
More information about the es-discuss