Skip to content

Commit

Permalink
Use pprint when generating error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutpalm committed Jan 31, 2024
1 parent bf209af commit 51bb3a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/righttypes/types.clj
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@

Object
(toString [this]
(if (first (:path this))
(str "{ "
(apply str "path://" (conj (vec (interpose "/" (:path this))) "/"))
" [" (:msg this) "]"
" }")
(str (:msg this)))))
(let [path-str (when (first (:path this))
(str "{ "
(apply str "path://" (conj (vec (interpose "/" (:path this))) "/"))
" [" (:msg this) "]"
" }"))]
(str (if path-str (str path-str "\n") "") (with-out-str (pprint this))))))


(defn error-positions
Expand Down

0 comments on commit 51bb3a0

Please sign in to comment.