- Activation record handlers. Each record can have a handler. If not set it is equivalent of
[throw :x]
just passing it up to the next activation record. Top activation record catches all and is set to[echo (:x printString) exit 1]
- Throwing does not unwind call stack, so a handler doing return will return back to the throw! Unless it calls
activation unwind
first, if so, the return will instead go to caller of the record where the handler is installed. - Errors as values...
Exceptions, errors etc are simply "not so often expected paths of execution". Clarity of code can often be enhanced if the "vanilla path" is clean of clutter for all these "less expected" paths.
In other words, we want most Spry code to be "uncluttered". We also don't want too many concepts since Spry is meant to be minimalistic in nature.