You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been hoping that we could eventually get some way of having multiple catch blocks which switch on which type of exception is thrown. The key here would be, if none of them match, it implicitly rethrows. This is a feature of most other languages with exceptions.
This pattern matching proposal ended up pretty differently from what might be more useful there. One problem is, we already do destructuring on the catch variable, so we can't start applying a different grammar.
I've been hoping that we could eventually get some way of having multiple catch blocks which switch on which type of exception is thrown. The key here would be, if none of them match, it implicitly rethrows. This is a feature of most other languages with exceptions.
This pattern matching proposal ended up pretty differently from what might be more useful there. One problem is, we already do destructuring on the catch variable, so we can't start applying a different grammar.
Do you see extensions that would allow it to be used in a context like this? One alternative would be https://github.com/zenparsing/es-typed-catch . I guess the viability of this ties into the answer to #13 as well.
The text was updated successfully, but these errors were encountered: