(defn- serialize-64 [x] (let [baos (ByteArrayOutputStream.)] (.writeObject (ObjectOutputStream. baos) x) (String. (.encode (Base64.) (.toByteArray baos))))) (defn- throw-form [e] `(throw (-> (.decode (Base64.) ~(serialize-64 e)) ByteArrayInputStream. ObjectInputStream. .readObject)))