/* "warning" assert -- safe to continue, so we don't throw exception. */ void wasserted(const char *msg, const char *file, unsigned line) { problem() << "Assertion failure " << msg << ' ' << file << ' ' << dec << line << endl; sayDbContext(); raiseError(0,msg && *msg ? msg : "wassertion failure"); lastAssert[1].set(msg, getDbContext().c_str(), file, line); assertionCount.condrollover( ++assertionCount.warning ); }
NOINLINE_DECL void fassertFailed( int msgid ) { problem() << "Fatal Assertion " << msgid << endl; sayDbContext(); breakpoint(); log() << "\n\n***aborting after fassert() failure\n\n" << endl; abort(); }
void asserted(const char *msg, const char *file, unsigned line) { problem() << "Assertion failure " << msg << ' ' << file << ' ' << dec << line << endl; sayDbContext(); raiseError(msg && *msg ? msg : "assertion failure"); lastAssert[0].set(msg, getDbContext().c_str(), file, line); throw AssertionException(); }
void asserted(const char *msg, const char *file, unsigned line) { problem() << "Assertion failure " << msg << ' ' << file << ' ' << dec << line << endl; sayDbContext(); raiseError(msg && *msg ? msg : "assertion failure"); lastAssert[0].set(msg, getDbContext().c_str(), file, line); stringstream temp; temp << "assertion " << file << ":" << line; AssertionException e; e.msg = temp.str(); throw e; }
/* "warning" assert -- safe to continue, so we don't throw exception. */ void wasserted(const char *msg, const char *file, unsigned line) { problem() << "warning Assertion failure " << msg << ' ' << file << ' ' << dec << line << endl; sayDbContext(); raiseError(0,msg && *msg ? msg : "wassertion failure"); assertionCount.condrollover( ++assertionCount.warning ); #if defined(_DEBUG) || defined(_DURABLEDEFAULTON) // this is so we notice in buildbot log() << "\n\n***aborting after wassert() failure in a debug/test build\n\n" << endl; abort(); #endif }
void asserted(const char *msg, const char *file, unsigned line) { assertionCount.condrollover( ++assertionCount.regular ); problem() << "Assertion failure " << msg << ' ' << file << ' ' << dec << line << endl; sayDbContext(); raiseError(0,msg && *msg ? msg : "assertion failure"); lastAssert[0].set(msg, getDbContext().c_str(), file, line); stringstream temp; temp << "assertion " << file << ":" << line; AssertionException e(temp.str(),0); breakpoint(); throw e; }
NOINLINE_DECL void verifyFailed( int msgid ) { assertionCount.condrollover( ++assertionCount.regular ); problem() << "Assertion failure " << msgid << endl; sayDbContext(); raiseError(0,"assertion failure"); stringstream temp; temp << msgid; AssertionException e(temp.str(),0); breakpoint(); #if defined(_DEBUG) || defined(_DURABLEDEFAULTON) || defined(_DURABLEDEFAULTOFF) // this is so we notice in buildbot log() << "\n\n***aborting after verify() failure in a debug/test build\n\n" << endl; abort(); #endif throw e; }
NOINLINE_DECL void asserted(const char *msg, const char *file, unsigned line) { assertionCount.condrollover( ++assertionCount.regular ); problem() << "Assertion failure " << msg << ' ' << file << ' ' << dec << line << endl; sayDbContext(); raiseError(0,msg && *msg ? msg : "assertion failure"); stringstream temp; temp << "assertion " << file << ":" << line; AssertionException e(temp.str(),0); breakpoint(); #if defined(_DEBUG) || defined(_DURABLEDEFAULTON) || defined(_DURABLEDEFAULTOFF) // this is so we notice in buildbot log() << "\n\n***aborting after assert() failure as this is a debug/test build\n\n" << endl; abort(); #endif throw e; }
/* "warning" assert -- safe to continue, so we don't throw exception. */ NOINLINE_DECL void wasserted(const char *msg, const char *file, unsigned line) { static bool rateLimited; static time_t lastWhen; static unsigned lastLine; if( lastLine == line && time(0)-lastWhen < 5 ) { if( rateLimited++ == 0 ) { log() << "rate limiting wassert" << endl; } return; } lastWhen = time(0); lastLine = line; problem() << "warning assertion failure " << msg << ' ' << file << ' ' << dec << line << endl; sayDbContext(); raiseError(0,msg && *msg ? msg : "wassertion failure"); assertionCount.condrollover( ++assertionCount.warning ); #if defined(_DEBUG) || defined(_DURABLEDEFAULTON) || defined(_DURABLEDEFAULTOFF) // this is so we notice in buildbot log() << "\n\n***aborting after wassert() failure in a debug/test build\n\n" << endl; abort(); #endif }