หมายเหตุ
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลอง ลงชื่อเข้าใช้หรือเปลี่ยนไดเรกทอรีได้
การเข้าถึงหน้านี้ต้องได้รับการอนุญาต คุณสามารถลองเปลี่ยนไดเรกทอรีได้
The class describes an exception that can be thrown from an unexpected handler.
Syntax
class bad_exception : public exception {};
bad_exception();
bad_exception(const bad_exception&);
bad_exception& operator=(const bad_exception&);
const char* what() const override;
Remarks
unexpected will throw a bad_exception instead of terminating or instead of calling another function specified with set_unexpected if bad_exception is included in the throw list of a function.
The value returned by what is an implementation-defined C string. None of the member functions throw any exceptions.
For a list of members inherited by the bad_exception class, see exception Class.
Example
See set_unexpected for an example of the use of unexpected throwing a bad_exception.