This was something I really loved during my time in Common Lisp. This was a gem that I was hoping would make it into Clojure, but I think around version 1.3 they decided to abandon the idea and add a library to "make anything throwable" which totally missed the point in my opinion. Are there any other languages that allow the calling scope to specify how lower-level functions handle errors without unwinding the stack…
Perl 6 allows for handling exception in a same-scope CATCH block, so you can try to recover. It can probably be mixed with their phasers[1] in interesting ways. Also of interest might be control exceptions[2]. 1: http://perlcabal.org/syn/S04.html#Phasers 2: http://perlcabal.org/syn/S04.html#Control_Exceptions
$ perl6
> $*PERL;
rakudo
> $*PERL;
2014.03.01
> { CONTROL { print 1; $_.resume }; print 2; warn; say 3 }
213
ref: https://news.ycombinator.com/item?id=7192294For a perl5 Condition System see this implementation - https://metacpan.org/pod/ConditionSystem