diff options
Diffstat (limited to 'src/mongo/logv2/log_manager.cpp')
-rw-r--r-- | src/mongo/logv2/log_manager.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mongo/logv2/log_manager.cpp b/src/mongo/logv2/log_manager.cpp index b5fc193ace3..d4710dc4977 100644 --- a/src/mongo/logv2/log_manager.cpp +++ b/src/mongo/logv2/log_manager.cpp @@ -58,13 +58,18 @@ LogManager::LogManager() { ++depth; // Try and log that we failed to log if (depth == 1) { + std::exception_ptr ex = nullptr; try { throw; + } catch (const DBException&) { + ex = std::current_exception(); } catch (...) { LOGV2(4638200, "Exception during log, message not written to stream", "exception"_attr = exceptionToStatus()); } + if (ex) + std::rethrow_exception(ex); } // Logging exceptions are fatal in debug builds. Guard ourselves from additional logging |