File tree Expand file tree Collapse file tree 2 files changed +15
-16
lines changed
Expand file tree Collapse file tree 2 files changed +15
-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)
137+ :preview
138+ (try
139+ (let [out (pr-str x)] (subs out 0 (min 32 (count out))))
140+ (catch Throwable _ :unprintable ))})))
142141
143142; ; Separate for CLJ-1381
144143(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
279+ :preview
280+ ( try
281+ ( let [s ( pr-str x)] ( subs s 0 ( min 32 ( count s))))
282+ ( catch :default _ :unprintable ))}) ))))
283283
284284; ;;; Unpacking
285285
You can’t perform that action at this time.
0 commit comments