mirror of
https://github.com/metosin/reitit.git
synced 2025-12-22 18:41:10 +00:00
Resolve reflection warnings
This commit is contained in:
parent
a77a583c09
commit
6322bb99f1
2 changed files with 4 additions and 4 deletions
|
|
@ -66,9 +66,9 @@
|
||||||
:headers {"Content-Type" "text/plain"}
|
:headers {"Content-Type" "text/plain"}
|
||||||
:body (str "Malformed " (-> e ex-data :format pr-str) " request.")})
|
:body (str "Malformed " (-> e ex-data :format pr-str) " request.")})
|
||||||
|
|
||||||
(defn wrap-log-to-console [handler e {:keys [uri request-method] :as req}]
|
(defn wrap-log-to-console [handler ^Throwable e {:keys [uri request-method] :as req}]
|
||||||
(print! *out* (Instant/now) request-method (pr-str uri) "=>" (.getMessage e))
|
(print! *out* (Instant/now) request-method (pr-str uri) "=>" (.getMessage e))
|
||||||
(.printStackTrace e *out*)
|
(.printStackTrace e ^PrintWriter *out*)
|
||||||
(handler e req))
|
(handler e req))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
|
|
@ -86,9 +86,9 @@
|
||||||
:headers {"Content-Type" "text/plain"}
|
:headers {"Content-Type" "text/plain"}
|
||||||
:body (str "Malformed " (-> e ex-data :format pr-str) " request.")})
|
:body (str "Malformed " (-> e ex-data :format pr-str) " request.")})
|
||||||
|
|
||||||
(defn wrap-log-to-console [handler e {:keys [uri request-method] :as req}]
|
(defn wrap-log-to-console [handler ^Throwable e {:keys [uri request-method] :as req}]
|
||||||
(print! *out* (Instant/now) request-method (pr-str uri) "=>" (.getMessage e))
|
(print! *out* (Instant/now) request-method (pr-str uri) "=>" (.getMessage e))
|
||||||
(.printStackTrace e *out*)
|
(.printStackTrace e ^PrintWriter *out*)
|
||||||
(handler e req))
|
(handler e req))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue