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_error
  • std::bad_alloc
  • std::bad_cast
  • std::bad_exception
  • std::bad_function_call
  • std::bad_typeid
  • std::bad_weak_ptr
  • std::ios_base::failure
  • std::logic_error
  • std::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 β€” the what() 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::failure
  • std::bad_alloc
  • std::filesystem::filesystem_error
  • std::bad_weak_ptr
  • std::bad_function_call
  • std::experimental::fundamentals_v1::bad_any_cast
  • std::experimental::filesystem::v1::filesystem_error
  • std::future_error
  • std::logic_error
  • std::runtime_error
  • std::bad_exception
  • std::bad_cast
  • std::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 by libstdc++, hanging out at std::exception(3cxx). periodt. πŸ’–
πŸ“¦ where this page comes from