libstdc++
|
00001 // Function-Based Exception Support -*- C++ -*- 00002 00003 // Copyright (C) 2001, 2004, 2005, 2008, 2009, 2010, 2011 00004 // Free Software Foundation, Inc. 00005 // 00006 // This file is part of the GNU ISO C++ Library. This library is free 00007 // software; you can redistribute it and/or modify it under the 00008 // terms of the GNU General Public License as published by the 00009 // Free Software Foundation; either version 3, or (at your option) 00010 // any later version. 00011 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 // GNU General Public License for more details. 00016 00017 // Under Section 7 of GPL version 3, you are granted additional 00018 // permissions described in the GCC Runtime Library Exception, version 00019 // 3.1, as published by the Free Software Foundation. 00020 00021 // You should have received a copy of the GNU General Public License and 00022 // a copy of the GCC Runtime Library Exception along with this program; 00023 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 00024 // <http://www.gnu.org/licenses/>. 00025 00026 /** @file bits/functexcept.h 00027 * This is an internal header file, included by other library headers. 00028 * Do not attempt to use it directly. @headername{exception} 00029 * 00030 * This header provides support for -fno-exceptions. 00031 */ 00032 00033 // 00034 // ISO C++ 14882: 19.1 Exception classes 00035 // 00036 00037 #ifndef _FUNCTEXCEPT_H 00038 #define _FUNCTEXCEPT_H 1 00039 00040 #include <bits/c++config.h> 00041 #include <bits/exception_defines.h> 00042 00043 namespace std _GLIBCXX_VISIBILITY(default) 00044 { 00045 _GLIBCXX_BEGIN_NAMESPACE_VERSION 00046 00047 // Helper for exception objects in <except> 00048 void 00049 __throw_bad_exception(void) __attribute__((__noreturn__)); 00050 00051 // Helper for exception objects in <new> 00052 void 00053 __throw_bad_alloc(void) __attribute__((__noreturn__)); 00054 00055 // Helper for exception objects in <typeinfo> 00056 void 00057 __throw_bad_cast(void) __attribute__((__noreturn__)); 00058 00059 void 00060 __throw_bad_typeid(void) __attribute__((__noreturn__)); 00061 00062 // Helpers for exception objects in <stdexcept> 00063 void 00064 __throw_logic_error(const char*) __attribute__((__noreturn__)); 00065 00066 void 00067 __throw_domain_error(const char*) __attribute__((__noreturn__)); 00068 00069 void 00070 __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 00071 00072 void 00073 __throw_length_error(const char*) __attribute__((__noreturn__)); 00074 00075 void 00076 __throw_out_of_range(const char*) __attribute__((__noreturn__)); 00077 00078 void 00079 __throw_runtime_error(const char*) __attribute__((__noreturn__)); 00080 00081 void 00082 __throw_range_error(const char*) __attribute__((__noreturn__)); 00083 00084 void 00085 __throw_overflow_error(const char*) __attribute__((__noreturn__)); 00086 00087 void 00088 __throw_underflow_error(const char*) __attribute__((__noreturn__)); 00089 00090 // Helpers for exception objects in <ios> 00091 void 00092 __throw_ios_failure(const char*) __attribute__((__noreturn__)); 00093 00094 void 00095 __throw_system_error(int) __attribute__((__noreturn__)); 00096 00097 void 00098 __throw_future_error(int) __attribute__((__noreturn__)); 00099 00100 // Helpers for exception objects in <functional> 00101 void 00102 __throw_bad_function_call() __attribute__((__noreturn__)); 00103 00104 _GLIBCXX_END_NAMESPACE_VERSION 00105 } // namespace 00106 00107 #endif