diff options
Diffstat (limited to 'src/com/github/ivarref/yoltq/impl.clj')
| -rw-r--r-- | src/com/github/ivarref/yoltq/impl.clj | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/com/github/ivarref/yoltq/impl.clj b/src/com/github/ivarref/yoltq/impl.clj index 6b14ffc..c37b0e6 100644 --- a/src/com/github/ivarref/yoltq/impl.clj +++ b/src/com/github/ivarref/yoltq/impl.clj @@ -23,11 +23,19 @@ #:db{:ident :com.github.ivarref.yoltq/error-time, :cardinality :db.cardinality/one, :valueType :db.type/long} #:db{:ident :com.github.ivarref.yoltq/version, :cardinality :db.cardinality/one, :valueType :db.type/string, :index true}]) +(defn pr-str-inner [x] + (binding [*print-dup* false + *print-meta* false + *print-readably* true + *print-length* nil + *print-level* nil + *print-namespace-maps* false] + (pr-str x))) (defn pr-str-safe [what x] (try - (if (= x (edn/read-string (pr-str x))) - (pr-str x) + (if (= x (edn/read-string (pr-str-inner x))) + (pr-str-inner x) (throw (ex-info (str "Could not read-string " what) {:input x}))) (catch Exception e (log/error "could not read-string" what ":" (ex-message e)) |
