From 084e276bbd33394dc2e52e273e6a6f8cad085e7e Mon Sep 17 00:00:00 2001 From: Christian Egli Date: Tue, 28 Jan 2025 10:18:55 +0100 Subject: [PATCH] Wrap the liblouis exception in a clojure.lang.ExceptionInfo for easier handling upstream --- src/clj/daisyproducer2/louis.clj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/clj/daisyproducer2/louis.clj b/src/clj/daisyproducer2/louis.clj index 95e4980..a3d47f7 100644 --- a/src/clj/daisyproducer2/louis.clj +++ b/src/clj/daisyproducer2/louis.clj @@ -38,4 +38,5 @@ ;; log the params that caused the exception and bubble it up (catch Exception e (log/errorf "Translation failed for word '%s' with tables %s: %s" word (str translator) e) - (throw e))))) + (throw + (ex-info "Braille translation failed" {:error-id :braille-translation-failed :errors word} e))))))