From 8926e0d1f18a233fbf6c8f9fc8b0c86749ddb5a5 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 7 Feb 2019 21:57:25 -0800 Subject: [PATCH] ircd: Attempt to find a current exception in terminate(). --- ircd/exception.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ircd/exception.cc b/ircd/exception.cc index 28b0b9e58..d849c8cbe 100644 --- a/ircd/exception.cc +++ b/ircd/exception.cc @@ -259,9 +259,7 @@ noexcept ircd::terminate::terminate() noexcept { - fputs("\nIRCd Terminated.\n", stderr); - ::fflush(stderr); - std::terminate(); + terminate(std::current_exception()); } ircd::terminate::terminate(std::exception_ptr eptr) @@ -276,7 +274,7 @@ noexcept terminate{e}; } - fputs("\nIRCd Terminate without exception\n", stderr); + fputs("\nIRCd Terminated.\n", stderr); ::fflush(stderr); std::terminate(); }