Skip to content

Commit

Permalink
Merge pull request #694 from whamtet/master
Browse files Browse the repository at this point in the history
bugfix
  • Loading branch information
ikitommi authored Aug 27, 2024
2 parents 517ae8f + c94ecf5 commit 734fca7
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@
(recur (.getSuperclass sk) (conj ks sk))
ks)))

(defn- descendants-safe [type]
(when-not (class? type) (descendants type)))

(defn- call-error-handler [handlers error request]
(let [type (:type (ex-data error))
ex-class (class error)
error-handler (or (get handlers type)
(get handlers ex-class)
(some
(partial get handlers)
(descendants type))
(descendants-safe type))
(some
(partial get handlers)
(super-classes ex-class))
Expand Down

0 comments on commit 734fca7

Please sign in to comment.