Sounds reasonable, though you could also use assert (which would throw
the exception).

http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/assert

On Feb 23, 10:21 am, Chris Jenkins <cdpjenk...@gmail.com> wrote:
> Hi,
>
> What's the best way to force compilation to fail? For example, what if
> invalid arguments are passed into a macro?
>
> (throw (InvalidArgumentException.))  seems to do the trick. Is this the best
> way to do it?
>
> Cheers,
>
> Chris

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