1 // Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
3 // This file is part of the GNU ISO C++ Library. This library is free
4 // software; you can redistribute it and/or modify it under the
5 // terms of the GNU General Public License as published by the
6 // Free Software Foundation; either version 3, or (at your option)
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // Under Section 7 of GPL version 3, you are granted additional
15 // permissions described in the GCC Runtime Library Exception, version
16 // 3.1, as published by the Free Software Foundation.
18 // You should have received a copy of the GNU General Public License and
19 // a copy of the GCC Runtime Library Exception along with this program;
20 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
21 // <http://www.gnu.org/licenses/>.
23 #include <bits/functexcept.h>
30 #include <system_error>
33 #ifdef _GLIBCXX_USE_NLS
35 # define _(msgid) gettext (msgid)
37 # define _(msgid) (msgid)
40 _GLIBCXX_BEGIN_NAMESPACE(std
)
44 __throw_bad_exception(void)
45 { throw bad_exception(); }
48 __throw_bad_alloc(void)
49 { throw bad_alloc(); }
52 __throw_bad_cast(void)
56 __throw_bad_typeid(void)
57 { throw bad_typeid(); }
60 __throw_logic_error(const char* __s
)
61 { throw logic_error(_(__s
)); }
64 __throw_domain_error(const char* __s
)
65 { throw domain_error(_(__s
)); }
68 __throw_invalid_argument(const char* __s
)
69 { throw invalid_argument(_(__s
)); }
72 __throw_length_error(const char* __s
)
73 { throw length_error(_(__s
)); }
76 __throw_out_of_range(const char* __s
)
77 { throw out_of_range(_(__s
)); }
80 __throw_runtime_error(const char* __s
)
81 { throw runtime_error(_(__s
)); }
84 __throw_range_error(const char* __s
)
85 { throw range_error(_(__s
)); }
88 __throw_overflow_error(const char* __s
)
89 { throw overflow_error(_(__s
)); }
92 __throw_underflow_error(const char* __s
)
93 { throw underflow_error(_(__s
)); }
96 __throw_ios_failure(const char* __s
)
97 { throw ios_base::failure(_(__s
)); }
100 __throw_system_error(int __i
)
101 { throw system_error(error_code(__i
, generic_category())); }
104 __throw_future_error(int __i
)
105 { throw future_error(future_errc(__i
)); }
109 __throw_bad_exception(void)
113 __throw_bad_alloc(void)
117 __throw_bad_cast(void)
121 __throw_bad_typeid(void)
125 __throw_logic_error(const char*)
129 __throw_domain_error(const char*)
133 __throw_invalid_argument(const char*)
137 __throw_length_error(const char*)
141 __throw_out_of_range(const char*)
145 __throw_runtime_error(const char*)
149 __throw_range_error(const char*)
153 __throw_overflow_error(const char*)
157 __throw_underflow_error(const char*)
161 __throw_ios_failure(const char*)
165 __throw_system_error(int)
169 __throw_future_error(int)
172 #endif //__EXCEPTIONS
174 _GLIBCXX_END_NAMESPACE