try/catch/else

T.J. Crowder tj.crowder at farsightsoftware.com
Tue Feb 13 11:57:24 UTC 2018


On Tue, Feb 13, 2018 at 11:54 AM, T.J. Crowder
<tj.crowder at farsightsoftware.com> wrote:
>
> Then
>
> * If `a` doesn't throw: a, b, d.
> * If `a` throws: a, c, d.
> * If `b` throws: a, b, c, d
> * If `a` and `c` both throw: a, c, d
> * If `b` and `c` both throw: a, b, c, d

Gah, I forgot that you don't want the `else` block subject to the
`catch`. So ignore that, and it no longer resembles the promise
version.

Don't like `else` in front of `catch` if exceptions from the code in
the `else` isn't caught.

-- T.J. Crowder


More information about the es-discuss mailing list