.TH "std::exception" 3cxx "Wed Jul 14 2021" "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::exception \- Base class for all library exceptions\&. .SH SYNOPSIS .br .PP .PP Inherited by __gnu_cxx::__concurrence_broadcast_error, __gnu_cxx::__concurrence_lock_error, __gnu_cxx::__concurrence_unlock_error, __gnu_cxx::__concurrence_wait_error, \fB__gnu_cxx::forced_error\fP, \fB__gnu_cxx::recursive_init_error\fP, \fBstd::bad_alloc\fP, \fBstd::bad_cast\fP, \fBstd::bad_exception\fP, \fBstd::bad_function_call\fP, \fBstd::bad_typeid\fP, \fBstd::bad_weak_ptr\fP, \fBstd::ios_base::failure\fP, \fBstd::logic_error\fP, and \fBstd::runtime_error\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBexception\fP (const \fBexception\fP &)=default" .br .ti -1c .RI "\fBexception\fP (\fBexception\fP &&)=default" .br .ti -1c .RI "\fBexception\fP & \fBoperator=\fP (const \fBexception\fP &)=default" .br .ti -1c .RI "\fBexception\fP & \fBoperator=\fP (\fBexception\fP &&)=default" .br .ti -1c .RI "virtual const char * \fBwhat\fP () const noexcept" .br .in -1c .SH "Detailed Description" .PP Base class for all library exceptions\&. This is the base class for all exceptions thrown by the standard library, and by certain language expressions\&. You are free to derive your own exception classes, or use a different hierarchy, or to throw non-class data (e\&.g\&., fundamental types)\&. .PP Definition at line 60 of file exception\&.h\&. .SH "Member Function Documentation" .PP .SS "virtual const char* std::exception::what () const\fC [virtual]\fP, \fC [noexcept]\fP" Returns a C-style character string describing the general cause of the current error\&. .br .PP Reimplemented in \fBstd::bad_typeid\fP, \fBstd::bad_cast\fP, \fBstd::bad_exception\fP, \fBstd::runtime_error\fP, \fBstd::logic_error\fP, \fBstd::future_error\fP, \fBstd::experimental::filesystem::v1::filesystem_error\fP, \fBstd::experimental::fundamentals_v1::bad_any_cast\fP, \fBstd::bad_function_call\fP, \fBstd::bad_weak_ptr\fP, \fBstd::bad_alloc\fP, and \fBstd::ios_base::failure\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.