Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.32 KB

bad-exception-class.md

File metadata and controls

34 lines (24 loc) · 1.32 KB
descriptiontitlems.datef1_keywordshelpviewer_keywordsms.assetid
Learn more about: bad_exception Class
bad_exception Class
11/04/2016
exception/std::bad_exception
bad_exception class
5ae2c4ef-c7ad-4469-8a9e-a773e86bb000

bad_exception Class

The class describes an exception that can be thrown from an unexpected handler.

Syntax

classbad_exception : publicexception {}; bad_exception(); bad_exception(const bad_exception&); bad_exception& operator=(const bad_exception&); constchar* what() constoverride;

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.

close