Proposal: GitHub - jeengbe/proposal-catch-guards
The document proposes a new syntax for catch clauses with guards for better code readability:
try {
someFunction();
} catch ErrorA (err) {
// Do something
} catch ErrorB | ErrorC (err) {
// Do another thing
} catch {
// Do a third thing
} finally {
// Clean up
}
The proposal is in need of a champion and a polished changeset to the spec.