Skip to content

Instantly share code, notes, and snippets.

@ninjudd
Created August 7, 2012 00:30
Show Gist options
  • Select an option

  • Save ninjudd/3279948 to your computer and use it in GitHub Desktop.

Select an option

Save ninjudd/3279948 to your computer and use it in GitHub Desktop.
(defn error [& args]
(binding [*out* *err*]
(apply println "Error:" args)))
(defn- load-hook [hook-ns]
(when-let [hook (try (utils/resolve-symbol (symbol (name hook-ns) "activate"))
(catch Throwable e
(error "problem activating" hook-ns "hook")
(throw e)))]
(try (hook)
(catch Throwable e
(error "problem activating" hook-ns "hook")
(throw e)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment