Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing ExceptionInfo processing (spec-assert branch) #126

Open
real-mj-song opened this issue Nov 22, 2016 · 1 comment
Open

Changing ExceptionInfo processing (spec-assert branch) #126

real-mj-song opened this issue Nov 22, 2016 · 1 comment

Comments

@real-mj-song
Copy link

Because we're now using s/assert based spec checking, we need to change the error processing. make-msg-info-hashes in messageobj.clj and error-dictionary in error-dictionary.clj are probably two primary methods to be modified.

@real-mj-song real-mj-song changed the title Changing ExceptionInfo processing Changing ExceptionInfo processing (spec-assert branch) Nov 22, 2016
@real-mj-song
Copy link
Author

(reduce 1.1 + [1 2 3])

Example exception message (can be customized if needed):
Spec assertion failed

Example exception hashmap:
{:clojure.spec/problems [{:path [:clojure-experiment.spec_error/first-arg], :pred ifn?, :val 1.1, :via [:clojure-experiment.spec_error/check-fn-any-coll :clojure-experiment.spec_error/check-fn :clojure-experiment.spec_error/check-fn], :in [0]}], :clojure.spec/failure :assertion-failed, :f-name reduce, :args [1.1 #object[clojure_experiment.spec_error$_PLUS_ 0x767e20cf clojure_experiment.spec_error$_PLUS_@767e20cf] [1 2 3]]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants