Print error before terminating in AsyncTask (#841)

This commit is contained in:
Martin Chang 2021-05-06 17:50:11 +08:00 committed by GitHub
parent f99c72bd5b
commit 6bfbf97eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@
#include <drogon/utils/optional.h> #include <drogon/utils/optional.h>
#include <trantor/net/EventLoop.h> #include <trantor/net/EventLoop.h>
#include <trantor/utils/Logger.h>
#include <algorithm> #include <algorithm>
#include <coroutine> #include <coroutine>
#include <exception> #include <exception>
@ -395,6 +396,7 @@ struct AsyncTask final
void unhandled_exception() void unhandled_exception()
{ {
LOG_FATAL << "Exception escaping AsyncTask";
std::terminate(); std::terminate();
} }