1
/*      Copyright (C) 2004 Garrett A. Kajmowicz
 
 
3
        This file is part of the uClibc++ Library.
 
 
5
        This library is free software; you can redistribute it and/or
 
 
6
        modify it under the terms of the GNU Lesser General Public
 
 
7
        License as published by the Free Software Foundation; either
 
 
8
        version 2.1 of the License, or (at your option) any later version.
 
 
10
        This library is distributed in the hope that it will be useful,
 
 
11
        but WITHOUT ANY WARRANTY; without even the implied warranty of
 
 
12
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
 
13
        Lesser General Public License for more details.
 
 
15
        You should have received a copy of the GNU Lesser General Public
 
 
16
        License along with this library; if not, write to the Free Software
 
 
17
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
20
#include <basic_definitions>
 
 
24
#ifndef HEADER_STD_EXCEPTIONS
 
 
25
#define HEADER_STD_EXCEPTIONS 1
 
 
27
//Don't include support if not needed
 
 
28
#ifdef __UCLIBCXX_EXCEPTION_SUPPORT__
 
 
30
#pragma GCC visibility push(default)
 
 
34
//typedef basic_string<char> string;
 
 
36
class _UCXXEXPORT logic_error : public exception {
 
 
40
        logic_error() throw();
 
 
41
        logic_error(const string& what_arg);
 
 
43
        virtual ~logic_error() throw() {}
 
 
44
        virtual const char * what() const throw();
 
 
48
class _UCXXEXPORT domain_error : public logic_error {
 
 
50
        domain_error() : logic_error() {}
 
 
51
        domain_error(const string& what_arg) : logic_error(what_arg) {}
 
 
52
        virtual ~domain_error() throw() {}
 
 
55
class _UCXXEXPORT invalid_argument : public logic_error {
 
 
57
        invalid_argument() : logic_error(){}
 
 
58
        invalid_argument(const string& what_arg) : logic_error(what_arg){}
 
 
59
        virtual ~invalid_argument() throw() {}
 
 
62
class _UCXXEXPORT length_error : public logic_error {
 
 
64
        length_error() : logic_error(){}
 
 
65
        length_error(const string& what_arg) : logic_error(what_arg){}
 
 
66
        virtual ~length_error() throw() {}
 
 
69
class _UCXXEXPORT out_of_range : public logic_error{
 
 
72
        out_of_range(const string & what_arg);
 
 
73
        virtual ~out_of_range() throw() {}
 
 
77
class _UCXXEXPORT runtime_error : public exception{
 
 
82
        runtime_error(const string& what_arg);
 
 
84
        virtual ~runtime_error() throw() {}
 
 
85
        virtual const char * what() const throw();
 
 
88
class _UCXXEXPORT range_error : public runtime_error{
 
 
90
        range_error() : runtime_error(){}
 
 
91
        range_error(const string& what_arg) : runtime_error(what_arg) {}
 
 
92
        virtual ~range_error() throw(){ }
 
 
96
class _UCXXEXPORT overflow_error : public runtime_error{
 
 
98
        overflow_error() : runtime_error(){}
 
 
99
        overflow_error(const string& what_arg) : runtime_error(what_arg) {}
 
 
100
        virtual ~overflow_error() throw(){}
 
 
103
class _UCXXEXPORT underflow_error : public runtime_error{
 
 
105
        underflow_error() : runtime_error(){}
 
 
106
        underflow_error(const string& what_arg) : runtime_error(what_arg) {}
 
 
107
        virtual ~underflow_error() throw(){}
 
 
114
#pragma GCC visibility pop