metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.48k stars 210 forks source link

Pluggable Pretty printing of exception via malli.core/-fail! #956

Closed ikitommi closed 8 months ago

ikitommi commented 1 year ago

Malli internals should always throw via m/-fail!. We should have pluggable (zero-cost) exception renderer:

  1. default to current (fast throw)
  2. helper to plug in malli.pretty/printer|thrower

malli.dev/start! should auto-plug the pretty stuff.

=> any exception in dev-mode would be pretty printed.

ikitommi commented 8 months ago

Done!