ah nice, never realised that, thank you. still it'd be somewhat more 
consistent to import ExceptionInfo:

(throw (Exception.))
(throw (IndexOutOfBoundsException.))
(throw (IllegalArgumentException.))
;; ...there's quite clearly a pattern here, which many are accustomed to
(throw (ex-info "" {})) ;; ex-info (however more pleasant is it to type) 
breaks that pattern

OTOH, I see ex-info is "alpha, subject to change" so relying on Java 
constructors may not be the right choice right now.

On Sunday, February 17, 2013 5:54:00 PM UTC+1, Baishampayan Ghose wrote:
>
> You can create an ExceptionInfo instance easily by using the core fn 
> `ex-info`. So something like ... (throw (ex-info {:foo "bar"})) works 
> fine. ~BG 
>
> On Sun, Feb 17, 2013 at 10:05 PM, vemv <ve...@vemv.net <javascript:>> 
> wrote: 
> > Couldn't clojure.lang.ExceptionInfo be imported by default? That'd 
> surely 
> > help making ExceptionInfo the idiomatic exception to be thrown. 
> > 
> > 
> > On Thursday, February 14, 2013 4:33:42 AM UTC+1, stuart....@gmail.comwrote: 
> >> 
> >> If you care about Clojure 1.5 compatibility for your codebase, please 
> test 
> >> it against RC 16 as soon as possible. 
> >> 
> >> You can get the source and build it yourself from [1], or wait for 
> Maven 
> >> Central [2] to pick up the CI build, which usually takes a few hours. 
> >> 
> >> Thanks! 
> >> Stu 
> >> 
> >> [1] https://github.com/clojure/clojure 
> >> [2] http://bit.ly/WEnjAi 
> > 
> > -- 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Clojure" group. 
> > To post to this group, send email to clo...@googlegroups.com<javascript:> 
> > Note that posts from new members are moderated - please be patient with 
> your 
> > first post. 
> > To unsubscribe from this group, send email to 
> > clojure+u...@googlegroups.com <javascript:> 
> > 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+u...@googlegroups.com <javascript:>. 
> > 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>
>
>
> -- 
> Baishampayan Ghose 
> b.ghose at gmail.com 
>

-- 
-- 
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/groups/opt_out.


Reply via email to