/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock
57 by edam
added ulibc
1
/*	Copyright (C) 2004 Garrett A. Kajmowicz
2
3
	This file is part of the uClibc++ Library.
4
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.
9
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.
14
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
18
*/
19
20
#include <basic_definitions>
21
#include <exception>
22
#include <string>
23
24
#ifndef HEADER_STD_EXCEPTIONS
25
#define HEADER_STD_EXCEPTIONS 1
26
27
//Don't include support if not needed
28
#ifdef __UCLIBCXX_EXCEPTION_SUPPORT__
29
30
#pragma GCC visibility push(default)
31
32
namespace std{
33
34
//typedef basic_string<char> string;
35
36
class _UCXXEXPORT logic_error : public exception {
37
protected:
38
	string mstring;
39
public:
40
	logic_error() throw();
41
	logic_error(const string& what_arg);
42
43
	virtual ~logic_error() throw() {}
44
	virtual const char * what() const throw();
45
46
};	
47
48
class _UCXXEXPORT domain_error : public logic_error {
49
public:
50
	domain_error() : logic_error() {}
51
	domain_error(const string& what_arg) : logic_error(what_arg) {}
52
	virtual ~domain_error() throw() {}
53
};
54
55
class _UCXXEXPORT invalid_argument : public logic_error {
56
public:
57
	invalid_argument() : logic_error(){}
58
	invalid_argument(const string& what_arg) : logic_error(what_arg){}
59
	virtual ~invalid_argument() throw() {}
60
};
61
62
class _UCXXEXPORT length_error : public logic_error {
63
public:
64
	length_error() : logic_error(){}
65
	length_error(const string& what_arg) : logic_error(what_arg){}
66
	virtual ~length_error() throw() {}
67
};
68
69
class _UCXXEXPORT out_of_range : public logic_error{
70
public:
71
	out_of_range();
72
	out_of_range(const string & what_arg);
73
	virtual ~out_of_range() throw() {}
74
75
};
76
77
class _UCXXEXPORT runtime_error : public exception{
78
protected:
79
	string mstring;
80
public:
81
	runtime_error();
82
	runtime_error(const string& what_arg);
83
84
	virtual ~runtime_error() throw() {}
85
	virtual const char * what() const throw();
86
};
87
88
class _UCXXEXPORT range_error : public runtime_error{
89
public:
90
	range_error() : runtime_error(){}
91
	range_error(const string& what_arg) : runtime_error(what_arg) {}
92
	virtual ~range_error() throw(){ }
93
};
94
95
96
class _UCXXEXPORT overflow_error : public runtime_error{
97
public:
98
	overflow_error() : runtime_error(){}
99
	overflow_error(const string& what_arg) : runtime_error(what_arg) {}
100
	virtual ~overflow_error() throw(){}
101
};
102
103
class _UCXXEXPORT underflow_error : public runtime_error{
104
public:
105
	underflow_error() : runtime_error(){}
106
	underflow_error(const string& what_arg) : runtime_error(what_arg) {}
107
	virtual ~underflow_error() throw(){}
108
};
109
110
111
112
}
113
114
#pragma GCC visibility pop
115
116
#endif
117
#endif