Permalink
Browse files

log error msgs

  • Loading branch information...
1 parent 0ef9186 commit 9bdc883e6e4589dc10f0948e465d14d85aa0618b Sun Ning committed Dec 13, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/metaq/core.clj
View
@@ -50,7 +50,12 @@
(let [executor# ~executor]
(reify MessageListener
(^void recieveMessages [this# ^Message msg#]
- ((fn ~arg-vec ~@handler-body) (.getData msg#)))
+ (try
+ ((fn ~arg-vec ~@handler-body) (.getData msg#))
+ (catch Exception e#
+ (logging/warn e# "Error processing message: "
+ (String. (.getData msg#) "UTF-8"))
+ (throw e#))))
(getExecutor [this]
executor#)))))

0 comments on commit 9bdc883

Please sign in to comment.