First public contribution.
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
17 #include "second_excp.h"
19 EXPORT_C int thrower2 (int x) {
20 #ifdef __SUPPORT_CPP_EXCEPTIONS__
21 if (x != 0) throw MySecondException(x);
22 #else //!__SUPPORT_CPP_EXCEPTIONS__
26 #endif //__SUPPORT_CPP_EXCEPTIONS__
30 EXPORT_C int thrower3 (int x) {
31 #ifdef __SUPPORT_CPP_EXCEPTIONS__
32 if (x != 0) throw MyThirdException(x);
33 #else //!__SUPPORT_CPP_EXCEPTIONS__
37 #endif //__SUPPORT_CPP_EXCEPTIONS__
41 #pragma warning( disable : 4673 ) /* throwing 'class MyFourthException' the following types will not be considered at the catch site */
43 EXPORT_C int thrower4 (int x) {
44 #ifdef __SUPPORT_CPP_EXCEPTIONS__
45 if (x != 0) throw MyFourthException(x);
46 #else //!__SUPPORT_CPP_EXCEPTIONS__
50 #endif //__SUPPORT_CPP_EXCEPTIONS__
54 EXPORT_C int thrower5 (int x) {
55 #ifdef __SUPPORT_CPP_EXCEPTIONS__
56 if (x != 0) throw MyFifthException(x);
57 #else //!__SUPPORT_CPP_EXCEPTIONS__
61 #endif //__SUPPORT_CPP_EXCEPTIONS__
66 EXPORT_C UncaughtTester::UncaughtTester(TInt & x) : aInt(x){}
68 EXPORT_C UncaughtTester::~UncaughtTester(){
69 #ifdef __SUPPORT_CPP_EXCEPTIONS__
70 if (std::uncaught_exception()) {
73 #endif //__SUPPORT_CPP_EXCEPTIONS__
75 #ifdef __SUPPORT_CPP_EXCEPTIONS__
77 #endif //__SUPPORT_CPP_EXCEPTIONS__