Skip to content

Commit

Permalink
fix: reflection errors in service
Browse files Browse the repository at this point in the history
  • Loading branch information
erdos committed Jul 31, 2024
1 parent ad00799 commit b196f56
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions service/src/stencil/service.clj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
[stencil.slf4j :as slf4j]
[clojure.data :refer [diff]]
[clojure.java.io :as io :refer [file]]
[clojure.string]
[ring.middleware.json :refer [wrap-json-body]]))

(set! *warn-on-reflection* true)
Expand Down Expand Up @@ -64,8 +65,8 @@
(prepared template)
(throw (ex-info "Template file does not exist!" {:status 404})))))

(defn- exception->str [e]
(clojure.string/join "\n" (for [e (iterate #(.getCause %) e) :while e] (.getMessage e))))
(defn- exception->str [^Exception e]
(clojure.string/join "\n" (for [^Exception e (iterate #(.getCause ^Exception %) e) :while e] (.getMessage e))))

(defn wrap-err [handler]
(fn [request]
Expand Down

0 comments on commit b196f56

Please sign in to comment.