Funny pipe code

Typically a “local return” is simply returning a value - which is what all functions naturally do. And even though it says throw you are essentially using it as a goto - i.e. tread carefully.

The primary intent behind a throw is a non-local return of a value as described in Try a try in a tree.

Aside return vs throw vs exit vs raise.