mirror of
https://github.com/penpot/penpot.git
synced 2025-01-10 00:40:30 -05:00
✨ Replace Error with Throwable (revert prev commit).
This reverts commit d218d70b8d
.
This commit is contained in:
parent
d218d70b8d
commit
ea03477e8e
2 changed files with 3 additions and 3 deletions
|
@ -104,14 +104,14 @@
|
||||||
(fn [request]
|
(fn [request]
|
||||||
(try
|
(try
|
||||||
(handler request)
|
(handler request)
|
||||||
(catch Error e
|
(catch Throwable e
|
||||||
(try
|
(try
|
||||||
(let [cdata (errors/get-error-context request e)]
|
(let [cdata (errors/get-error-context request e)]
|
||||||
(errors/update-thread-context! cdata)
|
(errors/update-thread-context! cdata)
|
||||||
(log/errorf e "Unhandled exception: %s (id: %s)" (ex-message e) (str (:id cdata)))
|
(log/errorf e "Unhandled exception: %s (id: %s)" (ex-message e) (str (:id cdata)))
|
||||||
{:status 500
|
{:status 500
|
||||||
:body "internal server error"})
|
:body "internal server error"})
|
||||||
(catch Error e
|
(catch Throwable e
|
||||||
(log/errorf e "Unhandled exception: %s" (ex-message e))
|
(log/errorf e "Unhandled exception: %s" (ex-message e))
|
||||||
{:status 500
|
{:status 500
|
||||||
:body "internal server error"})))))))
|
:body "internal server error"})))))))
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
(fn [request]
|
(fn [request]
|
||||||
(try
|
(try
|
||||||
(handler request)
|
(handler request)
|
||||||
(catch Error e
|
(catch Throwable e
|
||||||
(on-error e request)))))
|
(on-error e request)))))
|
||||||
|
|
||||||
(def errors
|
(def errors
|
||||||
|
|
Loading…
Reference in a new issue