0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-12 18:18:24 -05:00

Replace Throwable with Error.

This commit is contained in:
Andrey Antukh 2021-01-26 16:55:31 +01:00 committed by Alonso Torres
parent bc655ed9ef
commit d218d70b8d
2 changed files with 3 additions and 3 deletions

View file

@ -104,14 +104,14 @@
(fn [request]
(try
(handler request)
(catch Throwable e
(catch Error e
(try
(let [cdata (errors/get-error-context request e)]
(errors/update-thread-context! cdata)
(log/errorf e "Unhandled exception: %s (id: %s)" (ex-message e) (str (:id cdata)))
{:status 500
:body "internal server error"})
(catch Throwable e
(catch Error e
(log/errorf e "Unhandled exception: %s" (ex-message e))
{:status 500
:body "internal server error"})))))))

View file

@ -111,7 +111,7 @@
(fn [request]
(try
(handler request)
(catch Throwable e
(catch Error e
(on-error e request)))))
(def errors