fulcrologic / guardrails

Efficient, hassle-free function call validation with a concise inline syntax for clojure.spec and Malli
Eclipse Public License 2.0
240 stars 26 forks source link

provide actionable data in the exception thrown #15

Closed mpenet closed 3 years ago

mpenet commented 3 years ago

This adds some ex-data to the ex-info thrown.

a :type key to allow easy matching :com.fulcrologic.guardrails{ :spec :val :fn-name :failure-point } keys to allow to know where/how it failed.

This allows nicer interop with libs such as https://github.com/exoscale/ex but generally also better matching of the exception than just parsing the ex-message.

mpenet commented 3 years ago

amended