binaryage / binaryage/cljs-devtools

Custom formatter for ex-info thrown by cljs.spec

Open
#23 8 comments 0 reactions 0 assignees View on GitHub
cljs-bug enhancement
Dominant language
Clojure
Stars
1.1k
Forks
51
PR merge metrics
No merged PRs in 30d

Description

Currently it's quite tricky to get good output from cljs.spec. Reason being that the ex-info thrown includes the full spec commentary in ex-message. This includes the serialised val which failed. In my case this can fill the console many times over.

Alex Miller recommended catching these exceptions and using the ex-data to present the spec nicely. (e.g. don't print the ex-message to the console). This would be fine except it's difficult to catch all errors due to the nature of how UI code executes (react render loop, re-frame dispatch queue, callbacks)

How about automatically detecting and pretty formatting ex-info errors thrown by cljs.spec?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.