I noticed the other day, using beta 3, working at the REPL.  Some fairly
mundane errors (I no longer remember what they were) were showing up in the
stacktrace as Compiler Exceptions which completely threw off my intuition
about where to look in my code for those errors.  So you're not alone,
something definitely changed.

On Sat, May 23, 2015 at 6:44 AM, Mike Rodriguez <mjr4...@gmail.com> wrote:

> This isn't necessarily a problem, but I figured I'd put it up in case
> anyone encounters similar or so that people can be aware of it coming.
>
> We had some tests fail when I switched to the recent 1.7 versions of
> Clojure (beta3 was last I checked, but it shouldn't have changed here).
>
> The Clojure compiler now seems to wrap many (most/all?) exceptions thrown
> with a Compiler$CompilerException.
>
> We had some tests around macros that checked for certain exceptions being
> thrown - like ExceptionInfo or IllegalStateException etc. these were
> exceptions we explicitly through in macro error handling for compile-time
> error feedback with context.
> We used the typically clojure.test is-thrown? Style which makes an
> instanceof assertion.
>
> Arguably our tests were wrong to expect our macroexpansion exception types
> to be propagated all the way up to the caller without being wrapped first.
> However this was slightly surprising.
>
> To be better prepared for future changes like this, it looks like we
> should assert no more specific than a RuntimeException (or possibly
> Exception, but I doubt Clojure would switch to checked exceptions).
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to