Welcome! Please see the About page for a little more info on how this works.
The error message generated when case encounters a non-matching clause uses str, resulting in nil being rendered as an empty string, and strings without quote marks.
case
str
nil
For example:
(let [x nil] (case x 1 :a 2 :b)) ;; => ;; Unhandled java.lang.IllegalArgumentException ;; No matching clause for x:
And the potentially confusing
(let [x "1"] (case x 1 :a 2 :b)) ;; => ;; Unhandled java.lang.IllegalArgumentException ;; No matching clause for x: 1
Would it be less ambiguous to use pr-str for the value resulting in nil and "1" respectively?
pr-str
"1"
Note: a similar issue was raised for Clojurescript here: https://ask.clojure.org/index.php/6575/improve-error-messages-using-instead-when-printing-objects
Logged: https://clojure.atlassian.net/browse/CLJ-2564
Fixed in 1.10.2-alpha2
Makes sense, logged.