ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

_exception.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1996,1997
00003  * Silicon Graphics Computer Systems, Inc.
00004  *
00005  * Copyright (c) 1999
00006  * Boris Fomitchev
00007  *
00008  * This material is provided "as is", with absolutely no warranty expressed
00009  * or implied. Any use is at your own risk.
00010  *
00011  * Permission to use or copy this software for any purpose is hereby granted
00012  * without fee, provided the above notices are retained on all copies.
00013  * Permission to modify the code and to distribute modified code is granted,
00014  * provided the above notices are retained, and a notice that the code was
00015  * modified is included with the above copyright notice.
00016  */
00017 
00018 // The header <exception> contains low-level functions that interact
00019 // with a compiler's exception-handling mechanism.  It is assumed to
00020 // be supplied with the compiler, rather than with the library, because
00021 // it is inherently tied very closely to the compiler itself.
00022 
00023 // On platforms where <exception> does not exist, this header defines
00024 // an exception base class.  This is *not* a substitute for everything
00025 // in <exception>, but it suffices to support a bare minimum of STL
00026 // functionality.
00027 
00028 #ifndef _STLP_INTERNAL_EXCEPTION
00029 #define _STLP_INTERNAL_EXCEPTION
00030 
00031 #if !defined (_STLP_NO_EXCEPTION_HEADER)
00032 
00033 #  if defined ( _UNCAUGHT_EXCEPTION )
00034 #    undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT
00035 #  endif
00036 
00037 #  if defined (_STLP_BROKEN_EXCEPTION_CLASS)
00038 #    define exception     _STLP_NULLIFIED_BROKEN_EXCEPTION_CLASS
00039 #    define bad_exception _STLP_NULLIFIED_BROKEN_BAD_EXCEPTION_CLASS
00040 #    if defined (_STLP_NO_NEW_NEW_HEADER)
00041 #      include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception.h)
00042 #    else
00043 #      include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception)
00044 #    endif
00045 #    undef exception
00046 #    undef bad_exception
00047 #  else
00048 #    if defined (_STLP_NO_NEW_NEW_HEADER)
00049 #      if defined (_STLP_HAS_INCLUDE_NEXT)
00050 #        include_next <exception.h>
00051 #      else
00052 #        include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h)
00053 #      endif
00054 #    else
00055 #      if defined (_STLP_HAS_INCLUDE_NEXT)
00056 #        include_next <exception>
00057 #      else
00058 #        include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception)
00059 #      endif
00060 #    endif
00061 #  endif
00062 
00063 #  if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG) && defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1300)
00064 // dwa 02/04/00
00065 // The header <yvals.h> which ships with vc6 and is included by its native <exception>
00066 // actually turns on warnings, so we have to turn them back off.
00067 #    include <stl/config/_warnings_off.h>
00068 #  endif
00069 
00070 #  if defined (_STLP_USE_OWN_NAMESPACE)
00071 
00072 _STLP_BEGIN_NAMESPACE
00073 #    if !defined (_STLP_BROKEN_EXCEPTION_CLASS)
00074 #      if !defined (_STLP_USING_PLATFORM_SDK_COMPILER) || !defined (_WIN64)
00075 using _STLP_VENDOR_EXCEPT_STD::exception;
00076 #      else
00077 using ::exception;
00078 #      endif
00079 using _STLP_VENDOR_EXCEPT_STD::bad_exception;
00080 #    endif
00081 
00082 #    if !defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS)
00083 // fbp : many platforms present strange mix of
00084 // those in various namespaces
00085 #      if !defined (_STLP_VENDOR_UNEXPECTED_STD)
00086 #        define _STLP_VENDOR_UNEXPECTED_STD _STLP_VENDOR_EXCEPT_STD
00087 #      else
00088 /* The following definitions are for backward compatibility as _STLP_VENDOR_TERMINATE_STD
00089  * and _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD has been introduce after _STLP_VENDOR_UNEXPECTED_STD
00090  * and _STLP_VENDOR_UNEXPECTED_STD was the macro used in their place before that introduction.
00091  */
00092 #        if !defined (_STLP_VENDOR_TERMINATE_STD)
00093 #          define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_UNEXPECTED_STD
00094 #        endif
00095 #        if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
00096 #          define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_UNEXPECTED_STD
00097 #        endif
00098 #      endif
00099 #      if !defined (_STLP_VENDOR_TERMINATE_STD)
00100 #        define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_EXCEPT_STD
00101 #      endif
00102 #      if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
00103 #        define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_EXCEPT_STD
00104 #      endif
00105 #      if !defined (_STLP_VENDOR_TERMINATE_STD)
00106 #        define _STLP_VENDOR_TERMINATE_STD _STLP_VENDOR_EXCEPT_STD
00107 #      endif
00108 #      if !defined (_STLP_VENDOR_UNCAUGHT_EXCEPTION_STD)
00109 #        define _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD _STLP_VENDOR_EXCEPT_STD
00110 #      endif
00111 // weird errors
00112 #        if !defined (_STLP_NO_UNEXPECTED_EXCEPT_SUPPORT)
00113 #          if defined (__ICL) && (__ICL >= 900) && (_STLP_MSVC_LIB < 1300)
00114 //See config/_intel.h for reason about this workaround
00115 using std::unexpected;
00116 #          else
00117 using _STLP_VENDOR_UNEXPECTED_STD::unexpected;
00118 #          endif
00119 using _STLP_VENDOR_UNEXPECTED_STD::unexpected_handler;
00120 using _STLP_VENDOR_UNEXPECTED_STD::set_unexpected;
00121 #        endif
00122 using _STLP_VENDOR_TERMINATE_STD::terminate;
00123 using _STLP_VENDOR_TERMINATE_STD::terminate_handler;
00124 using _STLP_VENDOR_TERMINATE_STD::set_terminate;
00125 
00126 #      if !defined (_STLP_NO_UNCAUGHT_EXCEPT_SUPPORT)
00127 using _STLP_VENDOR_UNCAUGHT_EXCEPTION_STD::uncaught_exception;
00128 #      endif
00129 #    endif /* !_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS */
00130 _STLP_END_NAMESPACE
00131 #  endif /* _STLP_OWN_NAMESPACE */
00132 #else /* _STLP_NO_EXCEPTION_HEADER */
00133 
00134 /* fbp : absence of <exception> usually means that those
00135  * functions are not going to be called by compiler.
00136  * Still, define them for the user.
00137  * dums: Policy modification, if the function do not behave like the Standard
00138  *       defined it we do not grant it in the STLport namespace. We will have
00139  *       compile time error rather than runtime error.
00140  */
00141 #if 0
00142 /*
00143 typedef void (*unexpected_handler)();
00144 unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY;
00145 void unexpected();
00146 
00147 typedef void (*terminate_handler)();
00148 terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY;
00149 void terminate();
00150 
00151 bool uncaught_exception(); // not implemented under mpw as of Jan/1999
00152 */
00153 #endif
00154 
00155 #endif /* _STLP_NO_EXCEPTION_HEADER */
00156 
00157 #if defined (_STLP_NO_EXCEPTION_HEADER) || defined (_STLP_BROKEN_EXCEPTION_CLASS)
00158 _STLP_BEGIN_NAMESPACE
00159 
00160 // section 18.6.1
00161 class _STLP_CLASS_DECLSPEC exception {
00162 public:
00163 #  ifndef _STLP_USE_NO_IOSTREAMS
00164   exception() _STLP_NOTHROW;
00165   virtual ~exception() _STLP_NOTHROW;
00166   virtual const char* what() const _STLP_NOTHROW;
00167 #  else
00168   exception() _STLP_NOTHROW {}
00169   virtual ~exception() _STLP_NOTHROW {}
00170   virtual const char* what() const _STLP_NOTHROW {return "class exception";}
00171 #  endif
00172 };
00173 
00174 // section 18.6.2.1
00175 class _STLP_CLASS_DECLSPEC bad_exception : public exception {
00176 public:
00177 #  ifndef _STLP_USE_NO_IOSTREAMS
00178   bad_exception() _STLP_NOTHROW;
00179   ~bad_exception() _STLP_NOTHROW;
00180   const char* what() const _STLP_NOTHROW;
00181 #  else
00182   bad_exception() _STLP_NOTHROW {}
00183   ~bad_exception() _STLP_NOTHROW {}
00184   const char* what() const _STLP_NOTHROW {return "class bad_exception";}
00185 #  endif
00186 };
00187 
00188 // forward declaration
00189 class __Named_exception;
00190 _STLP_END_NAMESPACE
00191 #endif
00192 
00193 #endif /* _STLP_INTERNAL_EXCEPTION */

Generated on Sun May 27 2012 04:29:00 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.