[SDK][NDK] Move SYSTEM_POWER_INFORMATION to ntpoapi.h (#869)
[reactos.git] / sdk / include / c++ / exception
1 // Exception Handling support header for -*- C++ -*-
2
3 #ifndef __EXCEPTION__
4 #define __EXCEPTION__
5
6 #include <crtdefs.h>
7
8 extern "C++" {
9
10 class exception
11 {
12 public:
13 exception() throw();
14 exception(const char * const &) throw();
15 exception(const char * const &, int) throw();
16
17 virtual ~exception() throw();
18
19 virtual const char *what() const throw();
20 private:
21 const char *_name;
22 int _do_free;
23 };
24
25 class bad_exception : public exception
26 {
27 public:
28 bad_exception(const char *name = "bad exception") throw()
29 : exception(name) { }
30
31 virtual ~bad_exception() throw() { }
32 };
33
34 namespace std
35 {
36 using ::exception;
37 using ::bad_exception;
38
39 typedef void (*unexpected_handler) ();
40
41 unexpected_handler set_unexpected(unexpected_handler) throw();
42
43 __MINGW_ATTRIB_NORETURN void unexpected();
44
45 bool uncaught_exception() throw();
46 } // namespace std
47
48 typedef void (*terminate_handler) ();
49 terminate_handler set_terminate(terminate_handler) throw();
50 __MINGW_ATTRIB_NORETURN void terminate() throw();
51
52 } // extern "C++"
53
54 #endif