diff -r cc75c76972ee -r c0432d11811c tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp --- a/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp Wed Apr 21 12:15:23 2010 +0300 +++ b/tests/auto/exceptionsafety_objects/tst_exceptionsafety_objects.cpp Wed Apr 21 20:15:53 2010 +0300 @@ -43,6 +43,7 @@ #include #include +#include QT_USE_NAMESPACE @@ -285,8 +286,26 @@ allocFailer.reactivateAt(currentIndex); } +typedef void (*PVF)(); +PVF defaultTerminate; +void debugTerminate() +{ + // you can detect uncaught exceptions with a breakpoint in here + (*defaultTerminate)(); +} + +PVF defaultUnexpected; +void debugUnexpected() +{ + // you can detect unexpected exceptions with a breakpoint in here + (*defaultUnexpected)(); +} + void tst_ExceptionSafetyObjects::initTestCase() { + // set handlers for bad exception cases, you might want to step in and breakpoint the default handlers too + defaultTerminate = std::set_terminate(&debugTerminate); + defaultUnexpected = std::set_unexpected(&debugUnexpected); testMessageHandler = qInstallMsgHandler(safeMessageHandler); QVERIFY(AllocFailer::initialize());