Fork me on GitHub
#clojure-spec
<
2017-12-26
>
gklijs07:12:27

@flyboarder The Class java.lang.Exception extends Throwable implements Serializable, to get it to work you probably need to create your own exception which either extend from the java exception, or implement Serializable, that’s how far I can help you with my java background, never did anything yet in clojure for exception handling, so I don’t know how it’s different from java.

stathissideris09:12:04

@flyboarder looks like the serialization breaks for the spec itself which I believe is included in the ex-data of the ex-info, under the key :spec

stathissideris09:12:23

could you dissoc it as a quick test and try serializing again?

flyboarder19:12:35

@stathissideris that seems to work, I need to remove the entire namespaced key :clojure.spec.alpha/spec is there a way to future proof the removal for when the namespace changes?

Alex Miller (Clojure team)13:12:32

Alias clojure.spec.alpha to s in your namespace definition, then use ::s/spec. That way, you will just need to change the namespace in one spot.

flyboarder19:12:46

@gklijs I needed to wrap the exception in my own ex-info while removing the non-serializable parts, thanks!