Skip to content

Instantly share code, notes, and snippets.

@technomancy technomancy/safe.clj
Last active Dec 10, 2016

What would you like to do?
(doseq [n (all-ns)
[_ v] (ns-map n)
:when (and (var? v) (fn? @v))]
(alter-var-root v (fn [original]
(fn [& args]
(try (apply original args)
(catch Exception _))))))

This comment has been minimized.

Copy link

ericnormand commented Aug 28, 2014

Make sure to run this in main so that all namespaces are already loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.