Maƫl Nison (2015-04-11T14:21:55.000Z)
Hi,

Has the conditional catch clause
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch#Conditional_catch_clauses>
ever been considered for adoption in the standard? I've stumbled upon them
while seeking if there was a better option than the classic "if instanceof
/ else throw" inside the catch block, and it seems like a really nice
syntaxic sugar.

I guess that there might be some issues if the "if" expression itself
throws, but that doesn't seem a huge problem (and I guess that the folks at
Mozilla have already thought about this?).

// I've just made a search after writing this and before posting it, and I
found this thread <https://esdiscuss.org/topic/conditional-catch-clause>.
However, it is quite old (two years) and a major part of the discussion
seems to have shifted to StopIterator - which doesn't exist anymore, right ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150411/614b27a2/attachment.html>
d at domenic.me (2015-04-19T23:37:00.493Z)
Has the [conditional catch clause](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/try...catch#Conditional_catch_clauses)
ever been considered for adoption in the standard? I've stumbled upon them
while seeking if there was a better option than the classic "if instanceof
/ else throw" inside the catch block, and it seems like a really nice
syntaxic sugar.

I guess that there might be some issues if the "if" expression itself
throws, but that doesn't seem a huge problem (and I guess that the folks at
Mozilla have already thought about this?).

// I've just made a search after writing this and before posting it, and I
found this thread <https://esdiscuss.org/topic/conditional-catch-clause>.

However, it is quite old (two years) and a major part of the discussion
seems to have shifted to StopIterator - which doesn't exist anymore, right ?