Skip to content

Commit

Permalink
todo(WIP): write commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonjckn committed Sep 10, 2023
1 parent 382090c commit b98d3e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/malli/assert.clj
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

(defmacro assert
"Evaluates expr and throws an exception if it does not evaluate to logical true."
([schema x]
([?schema x]
(if *assert*
`(let [x# ~x]
(if (m/validate ~schema x#)
(if (m/validate ~?schema x#)
x#
(*reporter* ::m/explain (mu/explain-data ~schema ~x))))
(*reporter* ::m/explain (mu/explain-data ~?schema ~x))))
~x)))


Expand Down

0 comments on commit b98d3e3

Please sign in to comment.