Conditional catch clause

John J Barton johnjbarton at
Wed Dec 19 08:42:18 PST 2012

On Wed, Dec 19, 2012 at 8:11 AM, Brandon Benvie
<brandon at>wrote:

> The magical quality that throw has is its ability to end multiple call
> frames at once. Much like a second continuation channel, or the error
> channel in a promise, it escapes past any number of listeners on the normal
> channel, only stopping at the first listener on the error channel.

Well said: it's always possible to argue for 'goto' in specific cases. With
experience we've learned that these seemingly sensible features have
debilitating system effects.

The mistake of including StopIteration should not be used to justify
including more mistakes.

Communicating two different non-error results through the normal return
channel is not easy, but mixing one of the non-error results with errors
and sending them both through the error channel is not a solution, it's
just a hack.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list