sl@0: /* sl@0: * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(- * * ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * Name : exception sl@0: * Part of : standard c++ library. sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: sl@0: #ifndef _SYMCPP_EXCEPTION_H_ sl@0: #define _SYMCPP_EXCEPTION_H_ sl@0: sl@0: #ifdef __EABI__ sl@0: /* EABI specific definitions */ sl@0: #include sl@0: namespace std sl@0: { sl@0: class exception sl@0: { sl@0: public: sl@0: IMPORT_C exception() __NO_THROW; sl@0: IMPORT_C exception(const exception&) __NO_THROW; sl@0: IMPORT_C exception& operator=(const exception&) __NO_THROW; sl@0: IMPORT_C virtual ~exception() __NO_THROW; sl@0: IMPORT_C virtual const char* what() const __NO_THROW; sl@0: }; sl@0: sl@0: class bad_exception : public exception sl@0: { sl@0: public: sl@0: IMPORT_C bad_exception() __NO_THROW; sl@0: IMPORT_C bad_exception(const bad_exception&) __NO_THROW; sl@0: IMPORT_C bad_exception& operator=(const bad_exception&) __NO_THROW; sl@0: IMPORT_C virtual ~bad_exception() __NO_THROW; sl@0: IMPORT_C virtual const char* what() const __NO_THROW; sl@0: }; sl@0: sl@0: typedef void (*unexpected_handler)(); sl@0: sl@0: IMPORT_C unexpected_handler set_unexpected(unexpected_handler) __NO_THROW; sl@0: IMPORT_C void unexpected(); sl@0: sl@0: typedef void (*terminate_handler)(); sl@0: sl@0: IMPORT_C terminate_handler set_terminate(terminate_handler) __NO_THROW; sl@0: IMPORT_C void terminate(); sl@0: sl@0: IMPORT_C extern bool uncaught_exception() __NO_THROW; sl@0: } sl@0: sl@0: sl@0: sl@0: # else sl@0: sl@0: /* Declarations common to all other platforms (Non-EABI) here. sl@0: * WINSCW specific definitions are in exception_winscw.h sl@0: */ sl@0: # include sl@0: sl@0: namespace std { sl@0: sl@0: class exception { sl@0: public: sl@0: exception() __NO_THROW; sl@0: exception(const exception&) __NO_THROW; sl@0: exception& operator=(const exception&) __NO_THROW; sl@0: virtual ~exception() __NO_THROW; sl@0: virtual const char* what() const __NO_THROW; sl@0: }; sl@0: sl@0: class bad_exception : public exception { sl@0: public: sl@0: bad_exception() __NO_THROW; sl@0: bad_exception(const bad_exception&) __NO_THROW; sl@0: bad_exception& operator=(const bad_exception&) __NO_THROW; sl@0: virtual ~bad_exception() __NO_THROW; sl@0: virtual const char* what() const __NO_THROW; sl@0: }; sl@0: sl@0: typedef void (*terminate_handler)(); sl@0: extern terminate_handler set_terminate(terminate_handler) __NO_THROW; sl@0: sl@0: typedef void (*unexpected_handler)(); sl@0: extern unexpected_handler set_unexpected(unexpected_handler) __NO_THROW; sl@0: sl@0: void terminate(); sl@0: void unexpected(); sl@0: bool uncaught_exception() __NO_THROW; sl@0: sl@0: } sl@0: sl@0: # ifdef __WINSCW__ sl@0: /* sl@0: * C++ Exception specific stuff required from the CW runtime. sl@0: * Certain functions are implemented inline in CW headers. sl@0: * We're providing the same in exception_winscw.h sl@0: */ sl@0: # include sl@0: # endif //__WINSCW__ sl@0: sl@0: #endif // __EABI__ sl@0: #endif //_SYMCPP_EXCEPTION_ sl@0: