macro | since v0.0-2496 | ![]() | Edit |
(try-expr msg form)
Used by the 'is' macro to catch unexpected exceptions. You don't call this.
(defmacro try-expr
[msg form]
(let [{:keys [file line end-line column end-column]} (meta form)]
`(try
~(assert-expr &env msg form)
(catch :default t#
(report
{:type :error, :message ~msg,
:file ~file :line ~line :end-line ~end-line :column ~column :end-column ~end-column
:expected '~form, :actual t#})))))