Whole document tree functexcept.ccGo to the documentation of this file.00001 // Copyright (C) 2001 Free Software Foundation, Inc. 00002 // 00003 // This file is part of the GNU ISO C++ Library. This library is free 00004 // software; you can redistribute it and/or modify it under the 00005 // terms of the GNU General Public License as published by the 00006 // Free Software Foundation; either version 2, or (at your option) 00007 // any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 00014 // You should have received a copy of the GNU General Public License along 00015 // with this library; see the file COPYING. If not, write to the Free 00016 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 00017 // USA. 00018 00019 // As a special exception, you may use this file as part of a free software 00020 // library without restriction. Specifically, if other files instantiate 00021 // templates or use macros or inline functions from this file, or you compile 00022 // this file and link it with other files to produce an executable, this 00023 // file does not by itself cause the resulting executable to be covered by 00024 // the GNU General Public License. This exception does not however 00025 // invalidate any other reasons why the executable file might be covered by 00026 // the GNU General Public License. 00027 00028 #include <bits/functexcept.h> 00029 #include <cstdlib> 00030 #include <exception> 00031 #include <new> 00032 #include <typeinfo> 00033 #include <stdexcept> 00034 #include <ios> 00035 #include <string> 00036 00037 namespace std 00038 { 00039 #if __EXCEPTIONS 00040 void 00041 __throw_bad_exception(void) 00042 { throw bad_exception(); } 00043 00044 void 00045 __throw_bad_alloc(void) 00046 { throw bad_alloc(); } 00047 00048 void 00049 __throw_bad_cast(void) 00050 { throw bad_cast(); } 00051 00052 void 00053 __throw_bad_typeid(void) 00054 { throw bad_typeid(); } 00055 00056 void 00057 __throw_logic_error(const char* __s) 00058 { throw logic_error(__s); } 00059 00060 void 00061 __throw_domain_error(const char* __s) 00062 { throw domain_error(__s); } 00063 00064 void 00065 __throw_invalid_argument(const char* __s) 00066 { throw invalid_argument(__s); } 00067 00068 void 00069 __throw_length_error(const char* __s) 00070 { throw length_error(__s); } 00071 00072 void 00073 __throw_out_of_range(const char* __s) 00074 { throw out_of_range(__s); } 00075 00076 void 00077 __throw_runtime_error(const char* __s) 00078 { throw runtime_error(__s); } 00079 00080 void 00081 __throw_range_error(const char* __s) 00082 { throw range_error(__s); } 00083 00084 void 00085 __throw_overflow_error(const char* __s) 00086 { throw overflow_error(__s); } 00087 00088 void 00089 __throw_underflow_error(const char* __s) 00090 { throw underflow_error(__s); } 00091 00092 void 00093 __throw_ios_failure(const char* __s) 00094 { throw ios_base::failure(__s); } 00095 #else 00096 void 00097 __throw_bad_exception(void) 00098 { abort(); } 00099 00100 void 00101 __throw_bad_alloc(void) 00102 { abort(); } 00103 00104 void 00105 __throw_bad_cast(void) 00106 { abort(); } 00107 00108 void 00109 __throw_bad_typeid(void) 00110 { abort(); } 00111 00112 void 00113 __throw_logic_error(const char* __s) 00114 { abort(); } 00115 00116 void 00117 __throw_domain_error(const char* __s) 00118 { abort(); } 00119 00120 void 00121 __throw_invalid_argument(const char* __s) 00122 { abort(); } 00123 00124 void 00125 __throw_length_error(const char* __s) 00126 { abort(); } 00127 00128 void 00129 __throw_out_of_range(const char* __s) 00130 { abort(); } 00131 00132 void 00133 __throw_runtime_error(const char* __s) 00134 { abort(); } 00135 00136 void 00137 __throw_range_error(const char* __s) 00138 { abort(); } 00139 00140 void 00141 __throw_overflow_error(const char* __s) 00142 { abort(); } 00143 00144 void 00145 __throw_underflow_error(const char* __s) 00146 { abort(); } 00147 00148 void 00149 __throw_ios_failure(const char* __s) 00150 { abort(); } 00151 #endif //__EXCEPTIONS 00152 } Generated on Mon Apr 8 03:11:25 2002 for libstdc++-v3 Source by ![]() |