On Wed, Dec 23, 2009 at 5:03 PM, Mark Derricutt <m...@talios.com> wrote:
> 'lo,
>
> I was reading http://blog.fogus.me/2009/12/21/clojures-pre-and-post/
> on the new pre and post conditions and seeing that they throw
> java.lang.Exception kinda struck me as a bad smell, esp. when
> integrating with other systems written in Java or another language.
> Forcing upstream clients to catch the top level Exception seems rather
> rude on clojures part.
>

Forcing is the problem of Java's checked exceptions. Without them,
there would never be forcing.

> Was there any reason java.lang.Exception was used over say
> java.lang.AssertionError?  Or a more specific
> PreConditionAssertionError/PostConditionAssertionError pair?
>

But yes, java.lang.AssertionError is a better fit and I've changed
assert to throw that.

Rich

-- 
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

Reply via email to