Closed ikitommi closed 9 years ago
Found time to upgrade our codebase to 0.5.1 this morning - everything working fine so far, except there's a warning in CLJS now: WARNING: Use of undeclared Var schema-tools.core/Exception at line 192 target/cljs/schema_tools/core.cljs
Looks like the Exception
on this line should be something like #+clj Exception #+cljs js/Error
?
Thanks again for the work on this!
thanks! and fixed now in 0.5.2
.
Current select-schema can't handle keys predicates and fails silently when the value can't be coerced fully to match the schema.
In this PR, the internals are rewritten based on the discussion with the Prismatic guys. In addition, if a coercion fails, validation exception is thrown (identical to exception from
schema.core/validate
).breaking change:
select-schema
now either a) succeeds and returns the coerced value or b) fails with an exception.breaking change: argument order is changed to be coherent to other apis (supporting single-threading). Descriptive ex-info is thrown is fn is used with old argument order.