diff options
| author | Ivar Refsdal <refsdal.ivar@gmail.com> | 2022-06-30 09:52:49 +0200 |
|---|---|---|
| committer | Ivar Refsdal <refsdal.ivar@gmail.com> | 2022-06-30 09:52:49 +0200 |
| commit | 4fd3c882e5dbe905711d4aaf8f0e4fe52369cef7 (patch) | |
| tree | e7599238cf775831b24f3720445b3950ba89120d /src/com/github/ivarref/yoltq | |
| parent | Release 0.2.57 (diff) | |
| download | fiinha-4fd3c882e5dbe905711d4aaf8f0e4fe52369cef7.tar.gz fiinha-4fd3c882e5dbe905711d4aaf8f0e4fe52369cef7.tar.xz | |
Release 0.2.58
Document limitations, alternatives. Improve pr-str usage
Diffstat (limited to 'src/com/github/ivarref/yoltq')
| -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)) |
