A peer-to-peer stack for code collaboration
{:module 'prelude/exception
:doc "Tests for exceptions."
:exports []}
(:test "catch handles scope correctly"
;; Issue #191, catch used to accidentally use the lexical environment of
;; the `throw` that generated the exception.
[ ((fn [body handler] (catch 'any (body) handler)) (fn [] (throw 'foo "foo")) (fn [e] #t)) ==> #t ]
)