functexcept.h revision 169692
160107Sobrien// Function-Based Exception Support -*- C++ -*- 260107Sobrien 38217Sasami// Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. 48217Sasami// 58217Sasami// This file is part of the GNU ISO C++ Library. This library is free 68217Sasami// software; you can redistribute it and/or modify it under the 78217Sasami// terms of the GNU General Public License as published by the 88217Sasami// Free Software Foundation; either version 2, or (at your option) 98217Sasami// any later version. 108217Sasami 1132822Syokota// This library is distributed in the hope that it will be useful, 128217Sasami// but WITHOUT ANY WARRANTY; without even the implied warranty of 138217Sasami// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 148217Sasami// GNU General Public License for more details. 1532822Syokota 168217Sasami// You should have received a copy of the GNU General Public License along 178217Sasami// with this library; see the file COPYING. If not, write to the Free 188217Sasami// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 198217Sasami// USA. 2032822Syokota 2132822Syokota// As a special exception, you may use this file as part of a free software 228217Sasami// library without restriction. Specifically, if other files instantiate 2338141Syokota// templates or use macros or inline functions from this file, or you compile 248217Sasami// this file and link it with other files to produce an executable, this 258217Sasami// file does not by itself cause the resulting executable to be covered by 268217Sasami// the GNU General Public License. This exception does not however 278217Sasami// invalidate any other reasons why the executable file might be covered by 288217Sasami// the GNU General Public License. 298217Sasami 308217Sasami/** @file functexcept.h 318217Sasami * This header provides support for -fno-exceptions. 328217Sasami */ 338217Sasami 3432822Syokota// 3532822Syokota// ISO C++ 14882: 19.1 Exception classes 368217Sasami// 378217Sasami 388217Sasami#ifndef _FUNCTEXCEPT_H 398217Sasami#define _FUNCTEXCEPT_H 1 408217Sasami 418217Sasami#include <bits/c++config.h> 428217Sasami#include <exception_defines.h> 438217Sasami 448217Sasami_GLIBCXX_BEGIN_NAMESPACE(std) 458217Sasami 468217Sasami // Helper for exception objects in <except> 478217Sasami void 488217Sasami __throw_bad_exception(void) __attribute__((__noreturn__)); 498217Sasami 508217Sasami // Helper for exception objects in <new> 5132822Syokota void 528217Sasami __throw_bad_alloc(void) __attribute__((__noreturn__)); 538217Sasami 548217Sasami // Helper for exception objects in <typeinfo> 558217Sasami void 568217Sasami __throw_bad_cast(void) __attribute__((__noreturn__)); 578217Sasami 588217Sasami void 598217Sasami __throw_bad_typeid(void) __attribute__((__noreturn__)); 608217Sasami 618217Sasami // Helpers for exception objects in <stdexcept> 628217Sasami void 6343334Syokota __throw_logic_error(const char*) __attribute__((__noreturn__)); 648217Sasami 6532822Syokota void 668217Sasami __throw_domain_error(const char*) __attribute__((__noreturn__)); 678217Sasami 688217Sasami void 698217Sasami __throw_invalid_argument(const char*) __attribute__((__noreturn__)); 708217Sasami 718217Sasami void 728217Sasami __throw_length_error(const char*) __attribute__((__noreturn__)); 738217Sasami 748217Sasami void 758217Sasami __throw_out_of_range(const char*) __attribute__((__noreturn__)); 768217Sasami 778217Sasami void 788217Sasami __throw_runtime_error(const char*) __attribute__((__noreturn__)); 798217Sasami 808217Sasami void 818217Sasami __throw_range_error(const char*) __attribute__((__noreturn__)); 828217Sasami 838217Sasami void 8438141Syokota __throw_overflow_error(const char*) __attribute__((__noreturn__)); 858217Sasami 868217Sasami void 878217Sasami __throw_underflow_error(const char*) __attribute__((__noreturn__)); 888217Sasami 898217Sasami // Helpers for exception objects in basic_ios 908217Sasami void 9138141Syokota __throw_ios_failure(const char*) __attribute__((__noreturn__)); 928217Sasami 938217Sasami_GLIBCXX_END_NAMESPACE 948217Sasami 958217Sasami#endif 968217Sasami