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 #ifdef _GLIBCXX_USE_NLS
00036 # include <libintl.h>
00037 # define _(msgid) gettext (msgid)
00038 #else
00039 # define _(msgid) (msgid)
00040 #endif
00041
00042 namespace std
00043 {
00044 #if __EXCEPTIONS
00045 void
00046 __throw_bad_exception(void)
00047 { throw bad_exception(); }
00048
00049 void
00050 __throw_bad_alloc(void)
00051 { throw bad_alloc(); }
00052
00053 void
00054 __throw_bad_cast(void)
00055 { throw bad_cast(); }
00056
00057 void
00058 __throw_bad_typeid(void)
00059 { throw bad_typeid(); }
00060
00061 void
00062 __throw_logic_error(const char* __s)
00063 { throw logic_error(_(__s)); }
00064
00065 void
00066 __throw_domain_error(const char* __s)
00067 { throw domain_error(_(__s)); }
00068
00069 void
00070 __throw_invalid_argument(const char* __s)
00071 { throw invalid_argument(_(__s)); }
00072
00073 void
00074 __throw_length_error(const char* __s)
00075 { throw length_error(_(__s)); }
00076
00077 void
00078 __throw_out_of_range(const char* __s)
00079 { throw out_of_range(_(__s)); }
00080
00081 void
00082 __throw_runtime_error(const char* __s)
00083 { throw runtime_error(_(__s)); }
00084
00085 void
00086 __throw_range_error(const char* __s)
00087 { throw range_error(_(__s)); }
00088
00089 void
00090 __throw_overflow_error(const char* __s)
00091 { throw overflow_error(_(__s)); }
00092
00093 void
00094 __throw_underflow_error(const char* __s)
00095 { throw underflow_error(_(__s)); }
00096
00097 void
00098 __throw_ios_failure(const char* __s)
00099 { throw ios_base::failure(_(__s)); }
00100 #else
00101 void
00102 __throw_bad_exception(void)
00103 { abort(); }
00104
00105 void
00106 __throw_bad_alloc(void)
00107 { abort(); }
00108
00109 void
00110 __throw_bad_cast(void)
00111 { abort(); }
00112
00113 void
00114 __throw_bad_typeid(void)
00115 { abort(); }
00116
00117 void
00118 __throw_logic_error(const char*)
00119 { abort(); }
00120
00121 void
00122 __throw_domain_error(const char*)
00123 { abort(); }
00124
00125 void
00126 __throw_invalid_argument(const char*)
00127 { abort(); }
00128
00129 void
00130 __throw_length_error(const char*)
00131 { abort(); }
00132
00133 void
00134 __throw_out_of_range(const char*)
00135 { abort(); }
00136
00137 void
00138 __throw_runtime_error(const char*)
00139 { abort(); }
00140
00141 void
00142 __throw_range_error(const char*)
00143 { abort(); }
00144
00145 void
00146 __throw_overflow_error(const char*)
00147 { abort(); }
00148
00149 void
00150 __throw_underflow_error(const char*)
00151 { abort(); }
00152
00153 void
00154 __throw_ios_failure(const char*)
00155 { abort(); }
00156 #endif //__EXCEPTIONS
00157 }