haiku/headers/posix/exception

44 lines
1.0 KiB
Plaintext
Raw Normal View History

// XXX taken from /boot/develop/tools/gnupro/lib/gcc-lib/i586-beos/2.9-beos-991026/include
// XXX From GCC, exact license unknown. Must be LGPL or better :)
// XXX Doesn't belong into posix, should be replaced as soon as possible
// Exception Handling support header for -*- C++ -*-
// Copyright (C) 1995, 96-97, 1998 Free Software Foundation
#ifndef __EXCEPTION__
#define __EXCEPTION__
#pragma interface "exception"
extern "C++" {
namespace std {
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 () __attribute__ ((__noreturn__));
unexpected_handler set_unexpected (unexpected_handler);
void unexpected () __attribute__ ((__noreturn__));
bool uncaught_exception ();
} // namespace std
} // extern "C++"
#endif