Re: How to log a precondition in clojure 1.3

2012-12-22 Thread Gary Verhaegen
As I understand it, pre and post conditions are there to support contracts-based programming. Violating a contract should be considered as bad as having a compile-time error. So, as I see it, no, they are not meant for "basic validations", they are meant for strictly enforced rules. If your contra

Re: How to log a precondition in clojure 1.3

2012-12-06 Thread Jason Bennett
I hate to resurrect a dead thread, but I've been dealing with the same problem. Pre/postconditions throw an Error, not an exception, meaning you have to catch Throwable instead. This would violate most all good practice in Java/JVM programming. Are pre/postconditions just not designed for basic

Re: How to log a precondition in clojure 1.3

2012-03-21 Thread Sean Corfield
On Wed, Mar 21, 2012 at 9:34 AM, ron peterson wrote: > So I'd like to log the AssertionError using clojure.tools.logging > library. For example if my function throws the following: > # "resource" s)> > > How do I "redirect it" to be printed in the console using the > clojure.tools.logging library?

How to log a precondition in clojure 1.3

2012-03-21 Thread ron peterson
So I'd like to log the AssertionError using clojure.tools.logging library. For example if my function throws the following: # How do I "redirect it" to be printed in the console using the clojure.tools.logging library? Thanks, R. -- You received this message because you are subscribed to the Go