Skip to content

Commit

Permalink
Prevent error from failing agent
Browse files Browse the repository at this point in the history
  • Loading branch information
malcolmsparks committed Aug 29, 2018
1 parent e8f0e15 commit 71d83fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/juxt/kick/alpha/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
[config]
(let [builder-config (builder-config config)

debounce-a (agent nil)
debounce-a (agent nil
:error-handler (fn [error] (log/error error "Error in kick agent")))

init-results
(reduce-kv
Expand Down Expand Up @@ -91,7 +92,10 @@
(doseq [k (keys init-results)]
(log/debugf "Calling notify! on %s, events are %s" k events)
(when-let [notify! (get-method notify! k)]
(notify! k events (get init-results k)))))
(try
(notify! k events (get init-results k))
(catch Exception e
(log/errorf e "Error during notification of %s" k))))))
50))

watchers (mapv
Expand Down

0 comments on commit 71d83fc

Please sign in to comment.