On Sep 24, 12:33 am, Phil Hagelberg wrote:
> It looks like it's actually a subclass of Exception instead:
>
> user=> (eval '(throw (InterruptedException.)))
> java.lang.InterruptedException (NO_SOURCE_FILE:7)
> user=> (class *e)
> clojure.lang.Compiler$CompilerException
> use
John Harrop writes:
> The exception is being transformed. Eval and just about anything using
> closures -- just about any delayed evaluation, in other words -- wraps
> exceptions in RuntimeException for some reason. Even if they already were
> RuntimeExceptions (and InterruptedException isn't).
On Wed, Sep 23, 2009 at 6:42 PM, Phil Hagelberg wrote:
> What's going on here?
The exception is being transformed. Eval and just about anything using
closures -- just about any delayed evaluation, in other words -- wraps
exceptions in RuntimeException for some reason. Even if they already were
I'm rather confused by the different behaviour I'm getting from these
two similar-looking pieces of code. What's going on here?
;; works:
(try (throw (InterruptedException.))
(catch InterruptedException _))
;; exception is not caught:
(try (eval '(throw (InterruptedException.)))
(cat