00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 #include <bits/functexcept.h>
00029 #include <cstdlib>
00030 #include <exception>
00031 #include <stdexcept>
00032 #include <new>
00033 #include <typeinfo>
00034 #include <ios>
00035 
00036 namespace std 
00037 {
00038 #if __EXCEPTIONS
00039   void
00040   __throw_bad_exception(void)
00041   { throw bad_exception(); }
00042 
00043   void
00044   __throw_bad_alloc(void)
00045   { throw bad_alloc(); }
00046 
00047   void
00048   __throw_bad_cast(void)
00049   { throw bad_cast(); }
00050 
00051   void
00052   __throw_bad_typeid(void)
00053   { throw bad_typeid(); }
00054 
00055   void
00056   __throw_logic_error(const char* __s)
00057   { throw logic_error(__s); }
00058 
00059   void
00060   __throw_domain_error(const char* __s)
00061   { throw domain_error(__s); }
00062 
00063   void
00064   __throw_invalid_argument(const char* __s)
00065   { throw invalid_argument(__s); }
00066 
00067   void
00068   __throw_length_error(const char* __s)
00069   { throw length_error(__s); }
00070 
00071   void
00072   __throw_out_of_range(const char* __s)
00073   { throw out_of_range(__s); }
00074 
00075   void
00076   __throw_runtime_error(const char* __s)
00077   { throw runtime_error(__s); }
00078 
00079   void
00080   __throw_range_error(const char* __s)
00081   { throw range_error(__s); }
00082 
00083   void
00084   __throw_overflow_error(const char* __s)
00085   { throw overflow_error(__s); }
00086 
00087   void
00088   __throw_underflow_error(const char* __s)
00089   { throw underflow_error(__s); }
00090 
00091   void
00092   __throw_ios_failure(const char* __s)
00093   { throw ios_base::failure(__s); }
00094 #else
00095   void
00096   __throw_bad_exception(void)
00097   { abort(); }
00098 
00099   void
00100   __throw_bad_alloc(void)
00101   { abort(); }
00102 
00103   void
00104   __throw_bad_cast(void)
00105   { abort(); }
00106 
00107   void
00108   __throw_bad_typeid(void)
00109   { abort(); }
00110 
00111   void
00112   __throw_logic_error(const char*)
00113   { abort(); }
00114 
00115   void
00116   __throw_domain_error(const char*)
00117   { abort(); }
00118 
00119   void
00120   __throw_invalid_argument(const char*)
00121   { abort(); }
00122 
00123   void
00124   __throw_length_error(const char*)
00125   { abort(); }
00126 
00127   void
00128   __throw_out_of_range(const char*)
00129   { abort(); }
00130 
00131   void
00132   __throw_runtime_error(const char*)
00133   { abort(); }
00134 
00135   void
00136   __throw_range_error(const char*)
00137   { abort(); }
00138 
00139   void
00140   __throw_overflow_error(const char*)
00141   { abort(); }
00142 
00143   void
00144   __throw_underflow_error(const char*)
00145   { abort(); }
00146 
00147   void
00148   __throw_ios_failure(const char*)
00149   { abort(); }
00150 #endif //__EXCEPTIONS
00151 }