You're viewing version 1.2.0 of try-expr. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

try-expr

clojure.test

  • (try-expr msg form)
Used by the 'is' macro to catch unexpected exceptions.
You don't call this.

0 Examples top

Log in to add / edit an example.

See Also top

  • 0
    clojure.test/is

    Generic assertion macro. 'form' is any predicate test. 'msg' is an

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/test.clj:517 top

(defmacro try-expr
  "Used by the 'is' macro to catch unexpected exceptions.
  You don't call this."
  {:added "1.1"}
  [msg form]
  `(try ~(assert-expr msg form)
        (catch Throwable t#
          (do-report {:type :error, :message ~msg,
                      :expected '~form, :actual t#}))))
Vars in clojure.test/try-expr: defmacro apply concat hash-map list seq
Used in 0 other vars

Comments top

No comments for try-expr. Log in to add a comment.