Meaningful error message for Clojure.Spec validation in :pre
问题 I used the last days to dig deeper into clojure.spec in Clojure and ClojureScript. Until now I find it most useful, to use specs as guards in :pre and :post in public functions that rely on data in a certain format. (defn person-name [person] {:pre [(s/valid? ::person person)] :post [(s/valid? string? %)]} (str (::first-name person) " " (::last-name person))) The issue with that approach is, that I get a java.lang.AssertionError: Assert failed: (s/valid? ::person person) without any