#include <exception>namespace std { class exception; class bad_exception;
typedef void (*unexpected_handler)(); unexpected_handler set_unexpected(unexpected_handler f) throw(); <B>void unexpected(); typedef void (*terminate_handler)(); terminate_handler set_terminate(terminate_handler f) throw(); void terminate(); bool uncaught_exception(); }
namespace std { class exception { public: exception() throw(); exception(const exception&) throw(); exception& operator=(const exception&) throw(); virtual ~exception() throw(); virtual const char* what() const throw(); }; }The class exception defines the base class for the types of objects thrown as exceptions by C++ Standard library components, and certain expressions, to report errors detected during program execution.
std::exception
.
namespace std { class bad_exception : public exception { public: bad_exception() throw(); bad_exception(const bad_exception&) throw(); bad_exception& operator=(const bad_exception&) throw(); virtual ~bad_exception() throw(); virtual const char* what() const throw(); }; }The class bad_exception defines the type of objects thrown when an unexpected() handler throws or rethrows an exception that the violated exception specification does not allow, but the violated exception specification does include the std::bad_exception type.
std::bad_exception
.