Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

add thrown-cause? helper

  • Loading branch information...
commit 7059efc34702c03803e43d322cc98fa1e6ed9403 1 parent da24804
Nathan Marz nathanmarz authored

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. +7 0 src/clj/backtype/storm/util.clj
7 src/clj/backtype/storm/util.clj
@@ -127,6 +127,13 @@
127 127 (some (partial instance? klass))
128 128 boolean))
129 129
  130 +(defmacro thrown-cause? [klass & body]
  131 + `(try
  132 + ~@body
  133 + false
  134 + (catch Throwable t#
  135 + (exception-cause? ~klass t#))))
  136 +
130 137 (defmacro forcat [[args aseq] & body]
131 138 `(mapcat (fn [~args]
132 139 ~@body)

0 comments on commit 7059efc

Please sign in to comment.
Something went wrong with that request. Please try again.