OSDN Git Service

91th Cygnus<->FSF merge
[pf3gnuchains/gcc-fork.git] / gcc / cp / inc / exception
1 // Exception Handling support header for -*- C++ -*-
2 // Copyright (C) 1995, 1996 Free Software Foundation
3
4 #ifndef __EXCEPTION__
5 #define __EXCEPTION__
6
7 #pragma interface "exception"
8
9 extern "C++" {
10
11 #if 0
12 namespace std {
13 #endif
14
15 class exception {
16 public:
17   exception () { }
18   virtual ~exception () { }
19   virtual const char* what () const;
20 };
21
22 class bad_exception : public exception {
23 public:
24   bad_exception () { }
25   virtual ~bad_exception () { }
26 };
27
28 typedef void (*terminate_handler) ();
29 typedef void (*unexpected_handler) ();
30
31 terminate_handler set_terminate (terminate_handler);
32 void terminate (void);
33 unexpected_handler set_unexpected (unexpected_handler);
34 void unexpected (void);
35 bool uncaught_exception ();
36 } // extern "C++"
37
38 #if 0
39 } // namespace std
40 #endif
41
42 #endif