.cljc and tested on Node
(clojure -M:cljs-test) as well as the JVM.:verify-selection accepts two new values besides :throw/:assert and
the :skip/nil/false opt-outs: :log (print a warning — stderr on
Clojure, console.warn on ClojureScript — and continue) and a function
(called with {:paths ... :available ...}, selection continues).*verify-selection* (initially :throw) provides the
default for the :verify-selection option; an explicitly passed option
still wins.ExceptionInfo instead of an AssertionError.
This makes it catchable via (catch ExceptionInfo e ...) and works in ClojureScript
(where asserts may be elided in release builds). The unknown and available paths are
available as data:
(ex-data e)
;; => {:type :malli-select.core/unknown-paths
;; :data {:paths (...), :available (...)}}
If you were catching AssertionError or matching the assert message, update your code.
The preferred spelling of the :verify-selection option is now :throw (the default);
:assert still works, as do the :skip/nil/false opt-outs.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |