functexcept.h revision 169691
197403Sobrien// Function-Based Exception Support -*- C++ -*- 297403Sobrien 3169691Skan// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. 497403Sobrien// 597403Sobrien// This file is part of the GNU ISO C++ Library. This library is free 697403Sobrien// software; you can redistribute it and/or modify it under the 797403Sobrien// terms of the GNU General Public License as published by the 897403Sobrien// Free Software Foundation; either version 2, or (at your option) 997403Sobrien// any later version. 1097403Sobrien 1197403Sobrien// This library is distributed in the hope that it will be useful, 1297403Sobrien// but WITHOUT ANY WARRANTY; without even the implied warranty of 1397403Sobrien// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 1497403Sobrien// GNU General Public License for more details. 1597403Sobrien 1697403Sobrien// You should have received a copy of the GNU General Public License along 1797403Sobrien// with this library; see the file COPYING. If not, write to the Free 18169691Skan// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 1997403Sobrien// USA. 2097403Sobrien 2197403Sobrien// As a special exception, you may use this file as part of a free software 2297403Sobrien// library without restriction. Specifically, if other files instantiate 2397403Sobrien// templates or use macros or inline functions from this file, or you compile 2497403Sobrien// this file and link it with other files to produce an executable, this 2597403Sobrien// file does not by itself cause the resulting executable to be covered by 2697403Sobrien// the GNU General Public License. This exception does not however 2797403Sobrien// invalidate any other reasons why the executable file might be covered by 2897403Sobrien// the GNU General Public License. 2997403Sobrien 30169691Skan/** @file functexcept.h 31169691Skan * This header provides support for -fno-exceptions. 32169691Skan */ 33169691Skan 3497403Sobrien// 3597403Sobrien// ISO C++ 14882: 19.1 Exception classes 3697403Sobrien// 3797403Sobrien 38169691Skan#ifndef _FUNCTEXCEPT_H 39169691Skan#define _FUNCTEXCEPT_H 1 40169691Skan 41169691Skan#include <bits/c++config.h> 4297403Sobrien#include <exception_defines.h> 4397403Sobrien 44169691Skan_GLIBCXX_BEGIN_NAMESPACE(std) 45169691Skan 46132720Skan // Helper for exception objects in <except> 4797403Sobrien void 48169691Skan __throw_bad_exception(void) __attribute__((__noreturn__)); 4997403Sobrien 50132720Skan // Helper for exception objects in <new> 5197403Sobrien void 52169691Skan __throw_bad_alloc(void) __attribute__((__noreturn__)); 5397403Sobrien 54132720Skan // Helper for exception objects in <typeinfo> 5597403Sobrien void 56169691Skan __throw_bad_cast(void) __attribute__((__noreturn__)); 5797403Sobrien 5897403Sobrien void 59169691Skan __throw_bad_typeid(void) __attribute__((__noreturn__)); 6097403Sobrien 61132720Skan // Helpers for exception objects in <stdexcept> 6297403Sobrien void 63169691Skan __throw_logic_error(const char*) __attribute__((__noreturn__)); 6497403Sobrien 6597403Sobrien void 66169691Skan __throw_domain_error(const char*) __attribute__((__noreturn__)); 6797403Sobrien 6897403Sobrien void 69169691Skan __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 7097403Sobrien 7197403Sobrien void 72169691Skan __throw_length_error(const char*) __attribute__((__noreturn__)); 7397403Sobrien 7497403Sobrien void 75169691Skan __throw_out_of_range(const char*) __attribute__((__noreturn__)); 7697403Sobrien 7797403Sobrien void 78169691Skan __throw_runtime_error(const char*) __attribute__((__noreturn__)); 7997403Sobrien 8097403Sobrien void 81169691Skan __throw_range_error(const char*) __attribute__((__noreturn__)); 8297403Sobrien 8397403Sobrien void 84169691Skan __throw_overflow_error(const char*) __attribute__((__noreturn__)); 8597403Sobrien 8697403Sobrien void 87169691Skan __throw_underflow_error(const char*) __attribute__((__noreturn__)); 8897403Sobrien 8997403Sobrien // Helpers for exception objects in basic_ios 9097403Sobrien void 91169691Skan __throw_ios_failure(const char*) __attribute__((__noreturn__)); 9297403Sobrien 93169691Skan_GLIBCXX_END_NAMESPACE 94169691Skan 95169691Skan#endif 96