I always catch Throwable at any user-facing layer, and don't catch IllegalArgumentException anywhere so it'll get caught and logged as a coding error at the top. I'm not currently using preconditions but either way will work for me.
On Feb 25, 4:57 am, Shantanu Kumar <kumar.shant...@gmail.com> wrote: > Hi, > > I want to gather some feedback on how others are dealing with the > issue of pre-conditions raising AssertionError instead of > IllegalArgumentException, whereas the general practice is to catch > java.lang.Exception at the user-facing web layer. It would be pretty > embarrassing for a website to expose an AssertionError stack trace > rather than gracefully displaying an "Error occurred" page. Is the > solution to catch Throwable (because AssertionError is a subclass of > Error)? > > Shantanu -- 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