taoensso / nippy

The fastest serialization library for Clojure
https://www.taoensso.com/nippy
Eclipse Public License 1.0
1.04k stars 60 forks source link

More helpful deserialization errors for custom types #63

Closed cespare closed 9 years ago

cespare commented 9 years ago

Hi @ptaoussanis,

One thing that's bitten us a couple of times is that if you serialize some record and then forget to require the record definition on the receiving end before deserializing, you get this fairly generic error:

Thaw failed: Decryption/decompression failure, or data unfrozen/damaged.

I haven't looked at the wire format too much, but when deserialization fails would it be possible to guess that this is happening? It seems like the deserializer should be getting a class name it doesn't recognize.

Thanks!

ptaoussanis commented 9 years ago

Hi Caleb, that's a bug (typo in the code) - the original exception is supposed to be attached as a cause.

Thanks for the report. Will push a fixed release shortly and update here.

ptaoussanis commented 9 years ago

Just pushed [com.taoensso/nippy "2.8.0"] to Clojars: https://github.com/ptaoussanis/nippy/releases

Cheers! :-)

cespare commented 9 years ago

Nice! Thanks Peter!