diff options
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_symbian.cpp | 2 | ||||
-rw-r--r-- | tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index 332ce09..637408e 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -824,7 +824,7 @@ QtRRActiveScheduler::RunResult QtRRActiveScheduler::RunMarkedIfReady(TInt &runPr runPriority = active->Priority(); dataAccess->iStatus.iFlags&=~TRequestStatusAccess::ERequestActiveFlags; int vptr = *(int*)active; // vptr can be used to identify type when debugging leaves - TRAP(error, QT_TRYCATCH_ERROR(error, active->RunL())); + TRAP(error, QT_TRYCATCH_LEAVING(active->RunL())); if (error!=KErrNone) error=active->RunError(error); if (error) { diff --git a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp index af065ae..f29e12a 100644 --- a/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp +++ b/tests/auto/symbian/qmainexceptions/tst_qmainexceptions.cpp @@ -163,6 +163,7 @@ private slots: void leave(); void testTranslateBadAlloc(); void testTranslateBigAlloc(); + void testExceptionFromAO(); void testRoundTrip(); void testTrap(); void testPropagation(); @@ -327,6 +328,15 @@ void tst_qmainexceptions::testTranslateBigAlloc() TestSchedulerCatchesError(&TranslateBigAllocL, KErrNoMemory); } +void tst_qmainexceptions::testExceptionFromAO() +{ + CTestActive *act = new(ELeave) CTestActive(&ThrowBadAlloc, true); + act->Test(); + QCOMPARE(act->error, KErrNoMemory); + QVERIFY(act->cleanedUp); + delete act; +} + void tst_qmainexceptions::TestSymbianRoundTrip(int leave, int trap) { // check that leave converted to exception, converted to error gives expected error code |