File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed
Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change 131131
132132 Object
133133 (pack-bytes [x ^DataOutput out]
134- (pack-bytes
135- {:msgpack/unpackable
136- {:type (str (type x))
137- :preview
138- (try
139- (let [out (pr-str x)] (subs out 0 (min 32 (count out))))
140- (catch Throwable _ :unprintable ))}}
141- out)))
134+ (truss/ex-info!
135+ (str " Pack failed: unsupported type (" (type x) " )" )
136+ {:type (type x), :value x})))
142137
143138; ; Separate for CLJ-1381
144139(extend-protocol Packable (class (into-array Byte [])) (pack-bytes [a ^DataOutput out] (pack-bytes (byte-array a) out)))
Original file line number Diff line number Diff line change 272272 (pack-bytes [x out]
273273 (if (seqable? x)
274274 (pack-seq x out)
275- (pack-bytes
276- {:msgpack/unpackable
277- {:type (enc/type-name x)
278- :preview
279- (try
280- (let [s (pr-str x)] (subs s 0 (min 32 (count s))))
281- (catch :default _ :unprintable ))}}
282- out))))
275+ (let [type-name (enc/type-name x)]
276+ (truss/ex-info!
277+ (str " Pack failed: unsupported type (" type-name " )" )
278+ {:type type-name, :value x})))))
283279
284280; ;;; Unpacking
285281
You can’t perform that action at this time.
0 commit comments