BSLS_ASSERTTEST_NORETURN void AssertTest::failTestDriver(const char *text, const char *file, int line) { #ifdef BDE_BUILD_TARGET_EXC throw AssertTestException(text, file, line); #else printError(text, file, line); abort(); #endif }
BSLS_ASSERT_NORETURN void Assert::failThrow(const char *text, const char *file, int line) { #ifdef BDE_BUILD_TARGET_EXC if (!std::uncaught_exception()) { throw AssertTestException(text, file, line); } else { std::fprintf(stderr, "BSLS_ASSERTION ERROR: An uncaught exception is pending;" " cannot throw 'AssertTestException'.\n"); } #endif failAbort(text, file, line); }
BSLS_ASSERT_NORETURN void Assert::failThrow(const char *text, const char *file, int line) { #ifdef BDE_BUILD_TARGET_EXC if (!std::uncaught_exception()) { throw AssertTestException(text, file, line); } else { bsls::Log::logMessage(bsls::LogSeverity::e_ERROR, file, line, "BSLS_ASSERT: An uncaught exception is pending;" " cannot throw 'AssertTestException'."); } #endif failAbort(text, file, line); }