summaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-09-05 20:09:36 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-09-05 20:09:36 +0000
commit9a70767a4e5fe62f02145d02b02199992a014504 (patch)
tree4f240c6780d776cd46fe18194175038542316686 /vespalib
parent7d1371885d6333c795d7f6f8b2e8fc6bae1c3091 (diff)
Use std::exit
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/util/exceptions.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/vespalib/src/vespa/vespalib/util/exceptions.cpp b/vespalib/src/vespa/vespalib/util/exceptions.cpp
index e4b65a16dbc..f6b7906bed5 100644
--- a/vespalib/src/vespa/vespalib/util/exceptions.cpp
+++ b/vespalib/src/vespa/vespalib/util/exceptions.cpp
@@ -34,7 +34,7 @@ vespalib::string _G_what;
void silent_terminate() {
std::lock_guard<std::mutex> guard(_G_silence_mutex);
LOG(fatal, "Will exit with code 66 due to: %s", _G_what.c_str());
- exit(66); //OR _exit() ?
+ std::exit(66);
}
}
@@ -48,15 +48,9 @@ SilenceUncaughtException::SilenceUncaughtException(const std::exception & e) :
SilenceUncaughtException::~SilenceUncaughtException()
{
- LOG(info, "Reinstating the old handler");
std::set_terminate(_oldTerminate);
std::lock_guard<std::mutex> guard(_G_silence_mutex);
_G_what = "";
- if ( std::uncaught_exception() ) {
- LOG(info, "We are not caught");
- } else {
- LOG(info, "We are caught");
- }
}
vespalib::string