How to return a response when an exception is thrown? #1819
Answered
by
Iamnotagenius
drizzle042
asked this question in
Q&A
-
Currently all Drogon does is log the exception using trantor’s logger. But I don’t know how to send a response for a particular exception. |
Beta Was this translation helpful? Give feedback.
Answered by
Iamnotagenius
Apr 23, 2024
Replies: 1 comment
-
Set a custom exception handler before
Here's how you define one:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
drizzle042
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Set a custom exception handler before
.run()
like so:drogon::app().setExceptionHandler(myExceptionHandler);
Here's how you define one: