Catch UnknownHostException

This commit is contained in:
Peter Taoussanis 2013-02-11 11:47:24 +07:00
parent b3b109b08a
commit 17043d20b7
1 changed files with 3 additions and 1 deletions

View File

@ -186,7 +186,9 @@
(def get-hostname
(utils/memoize-ttl
60000 (fn [] (.. java.net.InetAddress getLocalHost getHostName))))
60000 (fn [] (try (.. java.net.InetAddress getLocalHost getHostName)
(catch java.net.UnknownHostException e
"UnknownHost")))))
(defn- wrap-appender-juxt
"Wraps compile-time appender juxt with additional runtime capabilities