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