Merge pull request #694 from whamtet/master

bugfix
This commit is contained in:
Tommi Reiman 2024-08-27 14:08:56 +03:00 committed by GitHub
commit 734fca7d4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,6 +19,9 @@
(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)
@ -26,7 +29,7 @@
(get handlers ex-class)
(some
(partial get handlers)
(descendants type))
(descendants-safe type))
(some
(partial get handlers)
(super-classes ex-class))