Hi list,
Is there a way to get Clojure warnings to act as errors and abort the
attempted operation? For now, I'm mainly interested in doing this in the
repl, because I will often do something like this:
(defn fn [x] (+ 1 x))
; WARNING: fn already refers to: #'clojure.core/fn ...
Oops! Did not really want to do that!
In some cases it's possible to unbind accidental bindings but in other
cases it's either not possible or just doesn't seem to work for me and I
end up having to restart the repl, which is annoying. I'd rather just
prevent it happening at all.
In production code I'm not a big fan of warnings either, as with a few
rare exceptions they correctly indicate that something is wrong, but can
lead to silent errors instead of fast, noisy failure. That leads to
things like subtle errors in your persistent data that comes back to
bite you several months later, far removed from the original error,
making it very hard to diagnose the root cause of the problem. So again,
a hard failure mode would be welcome.
- Robert
--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.