A way of explicitly reporting exceptions

Domenic Denicola 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][1]. 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.

[1]: https://gist.github.com/domenic/722cdac2f9f79f71ad0c

More information about the es-discuss mailing list