Re: throw-if with no exception class

2008-12-12 Thread Ralf Bensmann
Hi Rich, I am very interested in your view of the world - why are 'checked' exceptions evil? Thanks -Ralf On Thu, Dec 11, 2008 at 2:08 PM, Rich Hickey richhic...@gmail.com wrote: On Dec 10, 10:52 pm, Stephen C. Gilardi squee...@mac.com wrote: On Dec 10, 2008, at 4:38 AM, Ralf Bensmann

Re: throw-if with no exception class

2008-12-12 Thread Randall R Schulz
On Friday 12 December 2008 01:18, Ralf Bensmann wrote: Hi Rich, I am very interested in your view of the world - why are 'checked' exceptions evil? It's a huge and unending debate (last I checked). It's probably not worth recapping it here. I'm sure there are reams of blogs and email list

Re: throw-if with no exception class

2008-12-11 Thread Ralf Bensmann
Just throwing Exception is discouraged in Java, because its the supertype checked and unchecked exceptions. I often saw a JVM die of an unproper exception handling -- mainly when NullPointerExceptions were involved. So we are on the JVM, want Java interop and so my isistent recommendation is to

Re: throw-if with no exception class

2008-12-11 Thread Rich Hickey
On Dec 10, 10:52 pm, Stephen C. Gilardi [EMAIL PROTECTED] wrote: On Dec 10, 2008, at 4:38 AM, Ralf Bensmann wrote: Being a Java trainer for a long time, we talk with students about the handle-or-declare rule in Java and the two types of exceptions: checked (declared) and unchecked

Re: throw-if with no exception class

2008-12-10 Thread Ralf Bensmann
Being a Java trainer for a long time, we talk with students about the handle-or-declare rule in Java and the two types of exceptions: checked (declared) and unchecked (runtime). So I prefer using a RuntimeException because no exception was specified. On Wed, Dec 10, 2008 at 3:46 AM, Mark Volkmann

Re: throw-if with no exception class

2008-12-10 Thread Stephen C. Gilardi
On Dec 10, 2008, at 4:38 AM, Ralf Bensmann wrote: Being a Java trainer for a long time, we talk with students about the handle-or-declare rule in Java and the two types of exceptions: checked (declared) and unchecked (runtime). So I prefer using a RuntimeException because no exception was

throw-if with no exception class

2008-12-09 Thread Mark Volkmann
The throw-if function from clojure.contrib.except will throw a specified exception type. If none is specified, it throws a java.lang.Exception. I was expecting it would through a java.lang.RuntimeException. Which seems more correct? -- R. Mark Volkmann Object Computing, Inc.