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
use RuntimeException.
-Ralf

On Thu, Dec 11, 2008 at 4:52 AM, 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" (runtime). So I prefer using a RuntimeException
> because no exception was specified.
>
>
> I'm inclined to accept the recommendation to make RuntimeException the
> default. I see that Clojure's Java source code uses both. It seems to me
> that within Clojure, the distinction doesn't matter, but in the case of Java
> interop, RuntimeExceptions would be more in keeping with what Clojure's
> "never declare them" philosophy.
>
> Does anyone have any more advice on this?
>
> --Steve
>

--~--~---------~--~----~------------~-------~--~----~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to