From 69df01668ac9acdc329e66e68436d50cda4c7e74 Mon Sep 17 00:00:00 2001 From: Jappie Klooster Date: Wed, 20 Jul 2022 15:23:29 +0200 Subject: [PATCH] Update yesod-core/src/Yesod/Core/Class/Yesod.hs Co-authored-by: patrick brisbin --- yesod-core/src/Yesod/Core/Class/Yesod.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yesod-core/src/Yesod/Core/Class/Yesod.hs b/yesod-core/src/Yesod/Core/Class/Yesod.hs index 18ab351c..a5845126 100644 --- a/yesod-core/src/Yesod/Core/Class/Yesod.hs +++ b/yesod-core/src/Yesod/Core/Class/Yesod.hs @@ -78,9 +78,9 @@ class RenderRoute site => Yesod site where -- allows the user to specify how exceptions are cought. -- by default all async exceptions are thrown and synchronous -- exceptions render a 500 page. - -- One could override this for example to catch all exceptions - -- aside connection closed by peer to let yesod do more 500 page - -- rendering (instead of warp). + -- To catch all exceptions (even async) to render a 500 page, + -- set this to 'UnliftIO.Exception.catchSyncOrAsync'. Beware + -- this may have negative effects with functions like 'timeout'. catchHandlerExceptions :: MonadUnliftIO m => site -> m a -> (SomeException -> m a) -> m a catchHandlerExceptions _ = catch