std::exception(3cxx)
π
std::exception β base-class royalty, manual section 3cxx π
π NAME π
std::exception β the base class for all library exceptions. She's the blueprint, the moment, the origin story. π
β¨ SYNOPSIS β¨
#include <exception>
π Inherited by (the whole nepo-baby lineup) π
__gnu_cxx::__concurrence_broadcast_error__gnu_cxx::__concurrence_lock_error__gnu_cxx::__concurrence_unlock_error__gnu_cxx::__concurrence_wait_error__gnu_cxx::forced_errorstd::bad_allocstd::bad_caststd::bad_exceptionstd::bad_function_callstd::bad_typeidstd::bad_weak_ptrstd::ios_base::failurestd::logic_errorstd::runtime_error
π«Ά Public Member Functions π«Ά
exception (const exception &)=defaultβ defaulted, literally. Same energy, no custom code. β¨exception (exception &&)=defaultβ also defaulted. Move over, bestie. π¨exception & operator= (const exception &)=defaultβ defaulted copy assignment. Slay. πexception & operator= (exception &&)=defaultβ defaulted move assignment. Obsessed. πvirtual const char * what () const noexceptβ thewhat()member; full tea is below. π
πΈ Detailed Description πΈ
Base class for all library exceptions. That's the whole mood. π
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). No gatekeeping, bestie β do your own thing. π¦
π¬ Member Function Documentation π¬
π¦ what() β the signature, exactly π¦
virtual const char * std::exception::what () const [virtual], [noexcept]
Returns a C-style character string describing the general cause of the current error. She gives you the general cause, not the whole novel. π¬
Reimplemented in:
std::ios_base::failurestd::bad_allocstd::filesystem::filesystem_errorstd::bad_weak_ptrstd::bad_function_callstd::experimental::fundamentals_v1::bad_any_caststd::experimental::filesystem::v1::filesystem_errorstd::future_errorstd::logic_errorstd::runtime_errorstd::bad_exceptionstd::bad_caststd::bad_typeid
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. Doxygen really said "I'll do it myself." π
π that's the whole page, bestie β brought to you bylibstdc++, hanging out atstd::exception(3cxx). periodt. π
π¦ where this page comes from
- ubuntu noble: libstdc++-14-doc 14-20240412-0ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms