diff options
author | Mathias Stearn <mathias@10gen.com> | 2018-01-17 17:47:05 -0500 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2018-01-19 21:43:07 -0500 |
commit | 42c264630fa1e7d5924c291a9eeac6522d70f31e (patch) | |
tree | d6fe01c798cbb2c273423388161a98fe4729caaf /src/mongo/util/assert_util.cpp | |
parent | 6d92ce0e7ec4e9a0cf31e9f9940a63b03968bb88 (diff) | |
download | mongo-42c264630fa1e7d5924c291a9eeac6522d70f31e.tar.gz |
SERVER-25345 remove wassert
Diffstat (limited to 'src/mongo/util/assert_util.cpp')
-rw-r--r-- | src/mongo/util/assert_util.cpp | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/mongo/util/assert_util.cpp b/src/mongo/util/assert_util.cpp index 1049b359b81..7fda800f414 100644 --- a/src/mongo/util/assert_util.cpp +++ b/src/mongo/util/assert_util.cpp @@ -82,31 +82,6 @@ void DBException::traceIfNeeded(const DBException& e) { } } -/* "warning" assert -- safe to continue, so we don't throw exception. */ -NOINLINE_DECL void wasserted(const char* expr, const char* file, unsigned line) { - static bool rateLimited; - static time_t lastWhen; - static unsigned lastLine; - if (lastLine == line && time(0) - lastWhen < 5) { - if (!rateLimited) { - rateLimited = true; - log() << "rate limiting wassert" << endl; - } - return; - } - lastWhen = time(0); - lastLine = line; - - warning() << "warning assertion failure " << expr << ' ' << file << ' ' << dec << line << endl; - logContext(); - assertionCount.condrollover(++assertionCount.warning); -#if defined(MONGO_CONFIG_DEBUG_BUILD) - // this is so we notice in buildbot - severe() << "\n\n***aborting after wassert() failure in a debug/test build\n\n" << endl; - std::abort(); -#endif -} - NOINLINE_DECL void verifyFailed(const char* expr, const char* file, unsigned line) { assertionCount.condrollover(++assertionCount.regular); error() << "Assertion failure " << expr << ' ' << file << ' ' << dec << line << endl; |