Scroll to navigation

std::bad_exception::bad_exception(3) C++ Standard Libary std::bad_exception::bad_exception(3)

NAME

std::bad_exception::bad_exception - std::bad_exception::bad_exception

Synopsis

bad_exception() throw(); (until C++11)
(since C++11) bad_exception() noexcept; (constexpr since
C++26) bad_exception( const bad_exception& other ) (1) (until C++11) throw(); bad_exception( const bad_exception& other ) (2) (since C++11) noexcept; (constexpr since
C++26)

Constructs new bad_exception object.

1) Default constructor. what() returns an implementation-defined string. 2) Copy constructor. Initializes the object with the contents of other other.what()) == 0 (since C++11).

Parameters

other - bad_exception object to initialize with

2026.11.10 http://cppreference.com