So, my project is reaching a sufficient level of complexity where I
really need good error tracking - when something goes wrong, I need to
know exactly what it was.

I have programmed in Java for a long time, and my first instinct is to
simply use the try and throw special forms more or less as I would in
Java, even though the code in question is mostly pure Clojure without
directly utilizing any Java classes. I would simply throw whenever I
have an unexpected condition, and somewhere higher up the stack, where
it is easy to deal with it, I would log it and either try to recover
or present an error message.

However, in most other areas, once I've finally grokked the functional
practice for just about anything, I much prefer it to the Java way of
life.

So, I guess my question is, is using try/throw this way in Clojure
considered good Clojure code, or are they there mostly for Java
interop? Is there a more Lispy/functional way to do it?

Many thanks,
-Luke
--~--~---------~--~----~------------~-------~--~----~
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 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to