/*
        Copyright 04/26/98 Sun Microsystems, Inc. All Rights Reserved
*/
/* exception

   @(#)exception	1.2  04/26/98 20:43:21

   Declaration for ISO standard exception interface
*/

#if !defined(_EXCEPTION_HDR)
#define _EXCEPTION_HDR

namespace std {

    class exception {
    public:
	exception() throw() {}
	exception(const exception&) throw() {}
	exception& operator=(const exception&) throw() {return *this;}
	virtual ~exception() throw() {}
	virtual const char* what() const throw();
    };

    class bad_exception: public exception {
    public:
	bad_exception() throw() {}
	bad_exception(const bad_exception&) throw() {}
	bad_exception& operator=(const bad_exception&) throw() {return *this;}
	~bad_exception() throw() {}
	const char* what() const throw();
    };

    // Unexpected exception handling

    typedef void (*unexpected_handler)();
    unexpected_handler set_unexpected(unexpected_handler) throw();
    void unexpected();

    // Termination handling

    typedef void (*terminate_handler)();
    terminate_handler set_terminate(terminate_handler) throw();
    void terminate();

    bool uncaught_exception() throw();
}

#endif	/* _EXCEPTION_HDR */
