It's possible to standardize already existing filtered catch from
SpiderMonkey.

try {
   throw new Error('42');
} catch(e if e.message === 42) {

}

Then Promise.prototype.catch extension can work in very similar manner - by
predicate function and user code can easily adopt pattern-matching in
future.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to