/* "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 ); }
void msgassertedNoTrace(int msgid, const char *msg) { assertionCount.condrollover( ++assertionCount.warning ); log() << "Assertion: " << msgid << ":" << msg << endl; lastAssert[2].set(msg, getDbContext().c_str(), "", 0); raiseError(msgid,msg && *msg ? msg : "massert failure"); throw MsgAssertionException(msgid, msg); }
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 uasserted(const char *msg) { if ( ++uacount < 100 ) log() << "User Exception " << msg << endl; else RARELY log() << "User Exception " << msg << endl; lastAssert[3].set(msg, getDbContext().c_str(), "", 0); raiseError(msg); throw UserException(msg); }
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; }
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; }
void uasserted(int msgid, const char *msg) { assertionCount.condrollover( ++assertionCount.user ); lastAssert[3].set(msg, getDbContext().c_str(), "", 0); raiseError(msgid,msg); throw UserException(msgid, msg); }
void uassert_nothrow(const char *msg) { lastAssert[3].set(msg, getDbContext().c_str(), "", 0); raiseError(0,msg); }
void msgasserted(const char *msg) { log() << "Assertion: " << msg << '\n'; lastAssert[2].set(msg, getDbContext().c_str(), "", 0); raiseError(msg && *msg ? msg : "massert failure"); throw MsgAssertionException(msg); }