1169691Skan// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 297403Sobrien// 397403Sobrien// This file is part of the GNU ISO C++ Library. This library is free 497403Sobrien// software; you can redistribute it and/or modify it under the 597403Sobrien// terms of the GNU General Public License as published by the 697403Sobrien// Free Software Foundation; either version 2, or (at your option) 797403Sobrien// any later version. 897403Sobrien 997403Sobrien// This library is distributed in the hope that it will be useful, 1097403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of 1197403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1297403Sobrien// GNU General Public License for more details. 1397403Sobrien 1497403Sobrien// You should have received a copy of the GNU General Public License along 1597403Sobrien// with this library; see the file COPYING. If not, write to the Free 16169691Skan// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 1797403Sobrien// USA. 1897403Sobrien 1997403Sobrien// As a special exception, you may use this file as part of a free software 2097403Sobrien// library without restriction. Specifically, if other files instantiate 2197403Sobrien// templates or use macros or inline functions from this file, or you compile 2297403Sobrien// this file and link it with other files to produce an executable, this 2397403Sobrien// file does not by itself cause the resulting executable to be covered by 2497403Sobrien// the GNU General Public License. This exception does not however 2597403Sobrien// invalidate any other reasons why the executable file might be covered by 2697403Sobrien// the GNU General Public License. 2797403Sobrien 2897403Sobrien#include <bits/functexcept.h> 2997403Sobrien#include <cstdlib> 3097403Sobrien#include <exception> 3197403Sobrien#include <stdexcept> 3297403Sobrien#include <new> 3397403Sobrien#include <typeinfo> 3497403Sobrien#include <ios> 35169691Skan 36132720Skan#ifdef _GLIBCXX_USE_NLS 37132720Skan# include <libintl.h> 38132720Skan# define _(msgid) gettext (msgid) 39132720Skan#else 40132720Skan# define _(msgid) (msgid) 41132720Skan#endif 4297403Sobrien 43169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 44169691Skan 4597403Sobrien#if __EXCEPTIONS 4697403Sobrien void 4797403Sobrien __throw_bad_exception(void) 4897403Sobrien { throw bad_exception(); } 4997403Sobrien 5097403Sobrien void 5197403Sobrien __throw_bad_alloc(void) 5297403Sobrien { throw bad_alloc(); } 5397403Sobrien 5497403Sobrien void 5597403Sobrien __throw_bad_cast(void) 5697403Sobrien { throw bad_cast(); } 5797403Sobrien 5897403Sobrien void 5997403Sobrien __throw_bad_typeid(void) 6097403Sobrien { throw bad_typeid(); } 6197403Sobrien 6297403Sobrien void 6397403Sobrien __throw_logic_error(const char* __s) 64132720Skan { throw logic_error(_(__s)); } 6597403Sobrien 6697403Sobrien void 6797403Sobrien __throw_domain_error(const char* __s) 68132720Skan { throw domain_error(_(__s)); } 6997403Sobrien 7097403Sobrien void 7197403Sobrien __throw_invalid_argument(const char* __s) 72132720Skan { throw invalid_argument(_(__s)); } 7397403Sobrien 7497403Sobrien void 7597403Sobrien __throw_length_error(const char* __s) 76132720Skan { throw length_error(_(__s)); } 7797403Sobrien 7897403Sobrien void 7997403Sobrien __throw_out_of_range(const char* __s) 80132720Skan { throw out_of_range(_(__s)); } 8197403Sobrien 8297403Sobrien void 8397403Sobrien __throw_runtime_error(const char* __s) 84132720Skan { throw runtime_error(_(__s)); } 8597403Sobrien 8697403Sobrien void 8797403Sobrien __throw_range_error(const char* __s) 88132720Skan { throw range_error(_(__s)); } 8997403Sobrien 9097403Sobrien void 9197403Sobrien __throw_overflow_error(const char* __s) 92132720Skan { throw overflow_error(_(__s)); } 9397403Sobrien 9497403Sobrien void 9597403Sobrien __throw_underflow_error(const char* __s) 96132720Skan { throw underflow_error(_(__s)); } 9797403Sobrien 9897403Sobrien void 9997403Sobrien __throw_ios_failure(const char* __s) 100132720Skan { throw ios_base::failure(_(__s)); } 10197403Sobrien#else 10297403Sobrien void 10397403Sobrien __throw_bad_exception(void) 104169691Skan { std::abort(); } 10597403Sobrien 10697403Sobrien void 10797403Sobrien __throw_bad_alloc(void) 108169691Skan { std::abort(); } 10997403Sobrien 11097403Sobrien void 11197403Sobrien __throw_bad_cast(void) 112169691Skan { std::abort(); } 11397403Sobrien 11497403Sobrien void 11597403Sobrien __throw_bad_typeid(void) 116169691Skan { std::abort(); } 11797403Sobrien 11897403Sobrien void 11997403Sobrien __throw_logic_error(const char*) 120169691Skan { std::abort(); } 12197403Sobrien 12297403Sobrien void 12397403Sobrien __throw_domain_error(const char*) 124169691Skan { std::abort(); } 12597403Sobrien 12697403Sobrien void 12797403Sobrien __throw_invalid_argument(const char*) 128169691Skan { std::abort(); } 12997403Sobrien 13097403Sobrien void 13197403Sobrien __throw_length_error(const char*) 132169691Skan { std::abort(); } 13397403Sobrien 13497403Sobrien void 13597403Sobrien __throw_out_of_range(const char*) 136169691Skan { std::abort(); } 13797403Sobrien 13897403Sobrien void 13997403Sobrien __throw_runtime_error(const char*) 140169691Skan { std::abort(); } 14197403Sobrien 14297403Sobrien void 14397403Sobrien __throw_range_error(const char*) 144169691Skan { std::abort(); } 14597403Sobrien 14697403Sobrien void 14797403Sobrien __throw_overflow_error(const char*) 148169691Skan { std::abort(); } 14997403Sobrien 15097403Sobrien void 15197403Sobrien __throw_underflow_error(const char*) 152169691Skan { std::abort(); } 15397403Sobrien 15497403Sobrien void 15597403Sobrien __throw_ios_failure(const char*) 156169691Skan { std::abort(); } 15797403Sobrien#endif //__EXCEPTIONS 158169691Skan 159169691Skan_GLIBCXX_END_NAMESPACE 160