1// Exception Handling support header for -*- C++ -*-
2// Copyright (C) 1995, 96-97, 1998 Free Software Foundation
3
4#ifndef __EXCEPTION__
5#define __EXCEPTION__
6
7#pragma interface "exception"
8
9extern "C++" {
10
11namespace std {
12
13class exception {
14public:
15  exception () { }
16  virtual ~exception () { }
17  virtual const char* what () const;
18};
19
20class bad_exception : public exception {
21public:
22  bad_exception () { }
23  virtual ~bad_exception () { }
24};
25
26typedef void (*terminate_handler) ();
27typedef void (*unexpected_handler) ();
28
29terminate_handler set_terminate (terminate_handler);
30void terminate () __attribute__ ((__noreturn__));
31unexpected_handler set_unexpected (unexpected_handler);
32void unexpected () __attribute__ ((__noreturn__));
33bool uncaught_exception ();
34
35} // namespace std
36
37} // extern "C++"
38
39#endif
40