1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericopenlibs/cppstdlib/inc/exception Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,116 @@
1.4 +/*
1.5 + * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(- * * ies).
1.6 + * All rights reserved.
1.7 + * This component and the accompanying materials are made available
1.8 + * under the terms of the License "Eclipse Public License v1.0"
1.9 + * which accompanies this distribution, and is available
1.10 + * at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 + *
1.12 + * Initial Contributors:
1.13 + * Nokia Corporation - initial contribution.
1.14 + *
1.15 + * Contributors:
1.16 + *
1.17 + * Description:
1.18 + * Name : exception
1.19 + * Part of : standard c++ library.
1.20 + *
1.21 + */
1.22 +
1.23 +
1.24 +
1.25 +
1.26 +#ifndef _SYMCPP_EXCEPTION_H_
1.27 +#define _SYMCPP_EXCEPTION_H_
1.28 +
1.29 +#ifdef __EABI__
1.30 +/* EABI specific definitions */
1.31 +#include <e32def.h>
1.32 +namespace std
1.33 +{
1.34 + class exception
1.35 + {
1.36 + public:
1.37 + IMPORT_C exception() __NO_THROW;
1.38 + IMPORT_C exception(const exception&) __NO_THROW;
1.39 + IMPORT_C exception& operator=(const exception&) __NO_THROW;
1.40 + IMPORT_C virtual ~exception() __NO_THROW;
1.41 + IMPORT_C virtual const char* what() const __NO_THROW;
1.42 + };
1.43 +
1.44 + class bad_exception : public exception
1.45 + {
1.46 + public:
1.47 + IMPORT_C bad_exception() __NO_THROW;
1.48 + IMPORT_C bad_exception(const bad_exception&) __NO_THROW;
1.49 + IMPORT_C bad_exception& operator=(const bad_exception&) __NO_THROW;
1.50 + IMPORT_C virtual ~bad_exception() __NO_THROW;
1.51 + IMPORT_C virtual const char* what() const __NO_THROW;
1.52 + };
1.53 +
1.54 + typedef void (*unexpected_handler)();
1.55 +
1.56 + IMPORT_C unexpected_handler set_unexpected(unexpected_handler) __NO_THROW;
1.57 + IMPORT_C void unexpected();
1.58 +
1.59 + typedef void (*terminate_handler)();
1.60 +
1.61 + IMPORT_C terminate_handler set_terminate(terminate_handler) __NO_THROW;
1.62 + IMPORT_C void terminate();
1.63 +
1.64 + IMPORT_C extern bool uncaught_exception() __NO_THROW;
1.65 +}
1.66 +
1.67 +
1.68 +
1.69 +# else
1.70 +
1.71 +/* Declarations common to all other platforms (Non-EABI) here.
1.72 + * WINSCW specific definitions are in exception_winscw.h
1.73 + */
1.74 +# include <e32def.h>
1.75 +
1.76 +namespace std {
1.77 +
1.78 + class exception {
1.79 + public:
1.80 + exception() __NO_THROW;
1.81 + exception(const exception&) __NO_THROW;
1.82 + exception& operator=(const exception&) __NO_THROW;
1.83 + virtual ~exception() __NO_THROW;
1.84 + virtual const char* what() const __NO_THROW;
1.85 + };
1.86 +
1.87 + class bad_exception : public exception {
1.88 + public:
1.89 + bad_exception() __NO_THROW;
1.90 + bad_exception(const bad_exception&) __NO_THROW;
1.91 + bad_exception& operator=(const bad_exception&) __NO_THROW;
1.92 + virtual ~bad_exception() __NO_THROW;
1.93 + virtual const char* what() const __NO_THROW;
1.94 + };
1.95 +
1.96 + typedef void (*terminate_handler)();
1.97 + extern terminate_handler set_terminate(terminate_handler) __NO_THROW;
1.98 +
1.99 + typedef void (*unexpected_handler)();
1.100 + extern unexpected_handler set_unexpected(unexpected_handler) __NO_THROW;
1.101 +
1.102 + void terminate();
1.103 + void unexpected();
1.104 + bool uncaught_exception() __NO_THROW;
1.105 +
1.106 +}
1.107 +
1.108 +# ifdef __WINSCW__
1.109 +/*
1.110 + * C++ Exception specific stuff required from the CW runtime.
1.111 + * Certain functions are implemented inline in CW headers.
1.112 + * We're providing the same in exception_winscw.h
1.113 + */
1.114 +# include <stdapis/stlportv5/exception_winscw.h>
1.115 +# endif //__WINSCW__
1.116 +
1.117 +#endif // __EABI__
1.118 +#endif //_SYMCPP_EXCEPTION_
1.119 +