.TH "std::exception" 3 "libstdc++" \" -*- nroff -*- .ad l .nh .SH NAME std::exception \- Base class for all library exceptions\&. .SH SYNOPSIS .br .PP .PP \fR#include \fP .PP Inherited by , , , , \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, and \fBstd::bad_function_call\fP\&. .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBexception\fP (const exception &)=default" .br .ti -1c .RI "\fBexception\fP (exception &&)=default" .br .ti -1c .RI "exception & \fBoperator=\fP (const exception &)=default" .br .ti -1c .RI "exception & \fBoperator=\fP (exception &&)=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)\&. .SH "Member Function Documentation" .PP .SS "virtual const char * std::exception::what () const\fR [virtual]\fP, \fR [noexcept]\fP" Returns a C-style character string describing the general cause of the current error\&. .PP Reimplemented in \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::experimental::filesystem::v1::filesystem_error\fP, \fBstd::experimental::fundamentals_v1::bad_any_cast\fP, \fBstd::filesystem::filesystem_error\fP, \fBstd::future_error\fP, \fBstd::logic_error\fP, and \fBstd::runtime_error\fP\&. .SH "Author" .PP Generated automatically by Doxygen for libstdc++ from the source code\&.