Commits

Shantanu Kumar committed a24cb6a

fix capturing of pretty-printed spec as string in `verify-writable`

Comments (0)

Files changed (1)

src/main/clj/org/bituf/clj_dbspec.clj

   ([spec] {:pre [(map? spec)]}
     (or (not (read-only? spec))
       (throw (WriteNotAllowedException.
-               (format "Spec is in READ-ONLY mode: %s" (pp/pprint spec))))))
+               (format "Spec is in READ-ONLY mode: %s" (with-out-str
+                                                         (pp/pprint spec)))))))
   ([]
     (verify-writable *dbspec*)))