aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/inc/exception
blob: 1c4fda284b0909900faa372dabdc49f0482f99ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Exception Handling support header for -*- C++ -*-
// Copyright (C) 1995, 1996 Free Software Foundation

#ifndef __EXCEPTION__
#define __EXCEPTION__

#pragma interface "exception"

extern "C++" {

#if 0
namespace std {
#endif

class exception {
public:
  exception () { }
  virtual ~exception () { }
  virtual const char* what () const;
};

class bad_exception : public exception {
public:
  bad_exception () { }
  virtual ~bad_exception () { }
};

typedef void (*terminate_handler) ();
typedef void (*unexpected_handler) ();

terminate_handler set_terminate (terminate_handler);
void terminate (void) __attribute__ ((__noreturn__));
unexpected_handler set_unexpected (unexpected_handler);
void unexpected (void) __attribute__ ((__noreturn__));
bool uncaught_exception ();

#if 0
} // namespace std
#endif

} // extern "C++"

#endif