Skip to content

Commit

Permalink
[nop] Misc housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Apr 11, 2024
1 parent 496907a commit 58fa4af
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/taoensso/timbre.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -428,18 +428,13 @@
(defn- protected-fn [error-msg f]
(fn [data]
(enc/catching (f data) t
(let [{:keys [level ?ns-str ?file ?line ?column]} data]
(let [{:keys [level ?ns-str ?file ?line]} data]
(throw
(ex-info error-msg
{:output-fn f
:level level
:data data
:loc
{:ns ?ns-str
:file ?file
:line ?line
;; :column ?column
}}
:level level
:loc {:ns ?ns-str, :file ?file, :line ?line}
:log-data data}
t))))))

(comment ((protected-fn "Whoops" (fn [data] (/ 1 0))) {}))
Expand Down

0 comments on commit 58fa4af

Please sign in to comment.