Browse files

don't explode on missing query

  • Loading branch information...
1 parent 8056ec8 commit 5690be7cb8907fcb7ee5b3c8b5b485220d05d37a @hiredman committed Nov 1, 2013
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/clojurebot/core.clj
@@ -45,6 +45,7 @@
;; addressed-plugins ends up search through the list twice
(a-all (a-arr
(fn [{:keys [config] :as a-map}]
+ (log/info "here")
((comp boolean first filter)
(fn [[ns query action]]
(when-let [query (ns-resolve ns query)]
@@ -54,12 +55,17 @@
true (a-arr
(fn [{:keys [config] :as a-map}]
+ (log/info "here2")
(let [[ns query action] ((comp first filter)
(fn [[ns query action]]
(let [query (ns-resolve
ns query)]
- (query a-map)))
+ (log/info ns)
+ (log/info "query" query)
+ (when query
+ (query a-map))))
(:addressed-plugins config))]
+ (log/info "action" action)
(@(ns-resolve ns action) a-map))))
false (a-cond comic?
(a-arr (fn [m]

0 comments on commit 5690be7

Please sign in to comment.