Пример #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 );
    }
Пример #2
0
 NOINLINE_DECL void fassertFailed( int msgid ) {
     problem() << "Fatal Assertion " << msgid << endl;
     sayDbContext();
     breakpoint();
     log() << "\n\n***aborting after fassert() failure\n\n" << endl;
     abort();
 }
Пример #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();
 }
Пример #4
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;
 }
Пример #5
0
    /* "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
    }
Пример #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;
 }
Пример #7
0
    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;
    }
Пример #8
0
    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;
    }
Пример #9
0
    /* "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
    }