diff --git a/src/main/clojure/clara/rules/durability/fressian.clj b/src/main/clojure/clara/rules/durability/fressian.clj index a7f40c49..e1605596 100644 --- a/src/main/clojure/clara/rules/durability/fressian.clj +++ b/src/main/clojure/clara/rules/durability/fressian.clj @@ -132,7 +132,11 @@ ([^Reader rdr] (read-record rdr nil)) ([^Reader rdr add-fn] - (let [builder (-> (.readObject rdr) resolve deref) + (let [try-resolve #(if-let [clazz (resolve %)] + clazz + (throw (ex-info (str "Unable to resolve record symbol: '" % "'") + {:record-class %}))) + builder (-> (.readObject rdr) try-resolve deref) build-map (.readObject rdr) m (read-meta rdr)] (cond-> (builder build-map)