Example #1
0
	/* "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 );
    }
Example #2
0
 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);
 }
Example #3
0
 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();
 }
Example #4
0
 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);
 }
Example #5
0
 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;
 }
Example #6
0
 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;
 }
Example #7
0
 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);
 }
Example #8
0
 void uassert_nothrow(const char *msg) {
     lastAssert[3].set(msg, getDbContext().c_str(), "", 0);
     raiseError(0,msg);
 }
Example #9
0
 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);
 }