11195Srgrimes// Function-Based Exception Support -*- C++ -*- 250472Speter 337Srgrimes// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. 473251Sgshapiro// 538103Speter// This file is part of the GNU ISO C++ Library. This library is free 673251Sgshapiro// software; you can redistribute it and/or modify it under the 738103Speter// terms of the GNU General Public License as published by the 899451Sru// Free Software Foundation; either version 2, or (at your option) 955230Speter// any later version. 10108983Simp 1165532Snectar// This library is distributed in the hope that it will be useful, 1255230Speter// but WITHOUT ANY WARRANTY; without even the implied warranty of 13107318Sru// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1489364Sdes// GNU General Public License for more details. 15108002Sgreen 16108002Sgreen// You should have received a copy of the GNU General Public License along 1798187Sgordon// with this library; see the file COPYING. If not, write to the Free 1898187Sgordon// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 1955230Speter// USA. 2055230Speter 2155230Speter// As a special exception, you may use this file as part of a free software 221734Sjkh// library without restriction. Specifically, if other files instantiate 2317639Swosch// templates or use macros or inline functions from this file, or you compile 2417639Swosch// this file and link it with other files to produce an executable, this 2537Srgrimes// file does not by itself cause the resulting executable to be covered by 2677041Sru// the GNU General Public License. This exception does not however 2777041Sru// invalidate any other reasons why the executable file might be covered by 2877041Sru// the GNU General Public License. 2977041Sru 3098548Sru/** @file functexcept.h 3198548Sru * This header provides support for -fno-exceptions. 3257488Speter */ 3374837Sgreen 3492898Sdes// 3557459Smarkm// ISO C++ 14882: 19.1 Exception classes 3660677Skris// 3760677Skris 3860677Skris#ifndef _FUNCTEXCEPT_H 3982521Salex#define _FUNCTEXCEPT_H 1 40108002Sgreen 41147Srgrimes#include <bits/c++config.h> 4299449Sru#include <exception_defines.h> 4399449Sru 4427487Sasami_GLIBCXX_BEGIN_NAMESPACE(std) 4565168Sasami 4695144Sgshapiro // Helper for exception objects in <except> 4795144Sgshapiro void 4895144Sgshapiro __throw_bad_exception(void) __attribute__((__noreturn__)); 4999451Sru 5099451Sru // Helper for exception objects in <new> 5190281Sume void 5299451Sru __throw_bad_alloc(void) __attribute__((__noreturn__)); 5399451Sru 5499451Sru // Helper for exception objects in <typeinfo> 5564598Sgshapiro void 5664598Sgshapiro __throw_bad_cast(void) __attribute__((__noreturn__)); 5737Srgrimes 58263Srgrimes void 5999449Sru __throw_bad_typeid(void) __attribute__((__noreturn__)); 60263Srgrimes 614487Sphk // Helpers for exception objects in <stdexcept> 6295327Sobrien void 63100872Sru __throw_logic_error(const char*) __attribute__((__noreturn__)); 6495509Sru 6595509Sru void 665948Sjkh __throw_domain_error(const char*) __attribute__((__noreturn__)); 674487Sphk 6899449Sru void 69100872Sru __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 7099451Sru 71100872Sru void 7299451Sru __throw_length_error(const char*) __attribute__((__noreturn__)); 73100872Sru 7499451Sru void 7599451Sru __throw_out_of_range(const char*) __attribute__((__noreturn__)); 76100872Sru 7799449Sru void 7899449Sru __throw_runtime_error(const char*) __attribute__((__noreturn__)); 7999449Sru 8099449Sru void 8199449Sru __throw_range_error(const char*) __attribute__((__noreturn__)); 8299449Sru 8399449Sru void 8477041Sru __throw_overflow_error(const char*) __attribute__((__noreturn__)); 8599449Sru 8677041Sru void 8773251Sgshapiro __throw_underflow_error(const char*) __attribute__((__noreturn__)); 8899449Sru 8973251Sgshapiro // Helpers for exception objects in basic_ios 9098548Sru void 9198548Sru __throw_ios_failure(const char*) __attribute__((__noreturn__)); 92100872Sru 9399451Sru_GLIBCXX_END_NAMESPACE 9457488Speter 95100872Sru#endif 9699451Sru