functexcept.h revision 256281
1227825Stheraven// Function-Based Exception Support -*- C++ -*- 2227825Stheraven 3227825Stheraven// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. 4227825Stheraven// 5227825Stheraven// This file is part of the GNU ISO C++ Library. This library is free 6227825Stheraven// software; you can redistribute it and/or modify it under the 7227825Stheraven// terms of the GNU General Public License as published by the 8227825Stheraven// Free Software Foundation; either version 2, or (at your option) 9227825Stheraven// any later version. 10227825Stheraven 11227825Stheraven// This library is distributed in the hope that it will be useful, 12227825Stheraven// but WITHOUT ANY WARRANTY; without even the implied warranty of 13227825Stheraven// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14227825Stheraven// GNU General Public License for more details. 15227825Stheraven 16227825Stheraven// You should have received a copy of the GNU General Public License along 17227825Stheraven// with this library; see the file COPYING. If not, write to the Free 18227825Stheraven// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 19227825Stheraven// USA. 20227825Stheraven 21227825Stheraven// As a special exception, you may use this file as part of a free software 22227825Stheraven// library without restriction. Specifically, if other files instantiate 23227825Stheraven// templates or use macros or inline functions from this file, or you compile 24227825Stheraven// this file and link it with other files to produce an executable, this 25227825Stheraven// file does not by itself cause the resulting executable to be covered by 26227825Stheraven// the GNU General Public License. This exception does not however 27227825Stheraven// invalidate any other reasons why the executable file might be covered by 28227825Stheraven// the GNU General Public License. 29227825Stheraven 30227825Stheraven/** @file functexcept.h 31241903Sdim * This header provides support for -fno-exceptions. 32241903Sdim */ 33227825Stheraven 34227825Stheraven// 35227825Stheraven// ISO C++ 14882: 19.1 Exception classes 36227825Stheraven// 37227825Stheraven 38227825Stheraven#ifndef _FUNCTEXCEPT_H 39227825Stheraven#define _FUNCTEXCEPT_H 1 40227825Stheraven 41227825Stheraven#include <bits/c++config.h> 42227825Stheraven#include <exception_defines.h> 43227825Stheraven 44227825Stheraven_GLIBCXX_BEGIN_NAMESPACE(std) 45227825Stheraven 46227825Stheraven // Helper for exception objects in <except> 47227825Stheraven void 48227825Stheraven __throw_bad_exception(void) __attribute__((__noreturn__)); 49227825Stheraven 50227825Stheraven // Helper for exception objects in <new> 51227825Stheraven void 52227825Stheraven __throw_bad_alloc(void) __attribute__((__noreturn__)); 53227825Stheraven 54227825Stheraven // Helper for exception objects in <typeinfo> 55227825Stheraven void 56227825Stheraven __throw_bad_cast(void) __attribute__((__noreturn__)); 57227825Stheraven 58227825Stheraven void 59227825Stheraven __throw_bad_typeid(void) __attribute__((__noreturn__)); 60227825Stheraven 61227825Stheraven // Helpers for exception objects in <stdexcept> 62227825Stheraven void 63227825Stheraven __throw_logic_error(const char*) __attribute__((__noreturn__)); 64227825Stheraven 65227825Stheraven void 66227825Stheraven __throw_domain_error(const char*) __attribute__((__noreturn__)); 67227825Stheraven 68227825Stheraven void 69227825Stheraven __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 70227825Stheraven 71227825Stheraven void 72227825Stheraven __throw_length_error(const char*) __attribute__((__noreturn__)); 73227825Stheraven 74227825Stheraven void 75241903Sdim __throw_out_of_range(const char*) __attribute__((__noreturn__)); 76241903Sdim 77227825Stheraven void 78227825Stheraven __throw_runtime_error(const char*) __attribute__((__noreturn__)); 79227825Stheraven 80227825Stheraven void 81227825Stheraven __throw_range_error(const char*) __attribute__((__noreturn__)); 82227825Stheraven 83227825Stheraven void 84227825Stheraven __throw_overflow_error(const char*) __attribute__((__noreturn__)); 85227825Stheraven 86227825Stheraven void 87227825Stheraven __throw_underflow_error(const char*) __attribute__((__noreturn__)); 88227825Stheraven 89227825Stheraven // Helpers for exception objects in basic_ios 90227825Stheraven void 91227825Stheraven __throw_ios_failure(const char*) __attribute__((__noreturn__)); 92227825Stheraven 93227825Stheraven_GLIBCXX_END_NAMESPACE 94227825Stheraven 95227825Stheraven#endif 96227825Stheraven