Proposal: Conditional `catch` in Promises
Ayush Gupta
ayushg3112 at gmail.com
Wed Apr 25 04:11:15 UTC 2018
We could potentially provide the same functionality in `try/catch` by
extending the signature of `catch` to
```js
try {
} catch(<expression_var>, <function_expression>) {
}
```
If `<function_expression>` evaluates to truthy, invoke the `catch` block,
otherwise don't.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180425/c26bb368/attachment.html>
More information about the es-discuss
mailing list