You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
annotated-exception wraps exceptions in a semipermeable AnnotatedException e type, such that catching AnnotatedException e will also catch a thrown e (and provide a mempty for the annotations). So,
yesod currently uses HandlerContents as an exception to short-circuit execution of a handler. If an application is using AnnotatedException, then the current exception catching facilities will fail to handle an AnnotatedException HandlerContentsas a HandlerContents, and will instead fail.
You can work around this by defining an exception handling middleware:
removeAnnotatedException::HandlerForsitea->HandlerForsitea
removeAnnotatedException action =
action `catch`\(AnnotatedException _ (e ::SomeException)) ->
throwIO e
But this would "just work" if yesod were integrated with annotated-exception, if only to catch the HandlerContents.
The text was updated successfully, but these errors were encountered:
annotated-exception
wraps exceptions in a semipermeableAnnotatedException e
type, such that catchingAnnotatedException e
will also catch a throwne
(and provide amempty
for the annotations). So,will never let an
e
escape.However, only the
catch
andtry
functions inannotated-exception
will also "see through" theAnnotatedException e
and allow you to catch a plaine
.yesod
currently usesHandlerContents
as an exception to short-circuit execution of a handler. If an application is usingAnnotatedException
, then the current exception catching facilities will fail to handle anAnnotatedException HandlerContents
as aHandlerContents
, and will instead fail.You can work around this by defining an exception handling middleware:
But this would "just work" if
yesod
were integrated withannotated-exception
, if only to catch theHandlerContents
.The text was updated successfully, but these errors were encountered: