Usermode/libc++ - Exceptions mostly
[tpg/acess2.git] / Usermode / Libraries / libc++.so_src / include_exp / exception
1 /*
2  * Acess2 C++ Library
3  * - By John Hodge (thePowersGang)
4  *
5  * exception (header)
6  * - C++'s base exception type
7  */
8 #ifndef _LIBCXX_EXCEPTION_
9 #define _LIBCXX_EXCEPTION_
10
11 #define noexcept        throw()
12
13 #include "string"
14
15 namespace std {
16
17 class exception
18 {
19         string  m_what_str;
20 public:
21         exception() noexcept;
22         exception(const exception& e) noexcept;
23         exception& operator= (const exception& e) noexcept;
24         virtual ~exception() noexcept;
25         virtual const char* what() const noexcept;
26 protected:
27         exception(const string& what_str) noexcept;
28 };
29
30 class bad_exception:
31         public exception
32 {
33 public:
34         bad_exception() noexcept;
35 };
36
37 typedef void (*terminate_handler)();
38 typedef void (*unexpected_handler)();
39
40 extern void set_terminate(terminate_handler f) throw();
41 extern void set_unexpected(unexpected_handler f) throw();
42 extern void terminate();
43 extern void unexpected();
44 extern bool uncaught_exception() throw();
45
46 };      // namespace std
47
48 #endif
49 // vim: ft=cpp
50

UCC git Repository :: git.ucc.asn.au