-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support annotated-exception
#1761
Comments
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: