std::system_error(3cxx)
π NAME π
std::system_error β an exception type that includes an error_code value. Bestie, this is the std::system_error(3cxx) page, and that's the name drop. π
β¨ SYNOPSIS β¨
#include <system_error>
Inherits std::runtime_error.
Inherited by std::experimental::filesystem::v1::filesystem_error, and std::filesystem::filesystem_error.
π«Ά Public Member Functions π«Ά
Exact signatures, no cap β no remixing, no renaming:
system_error (const system_error &)=default
system_error (error_code __ec, const char *__what)
system_error (error_code __ec, const string &__what)
system_error (error_code __ec=error_code())
system_error (int __v, const error_category &__ecat)
system_error (int __v, const error_category &__ecat, const char *__what)
system_error (int __v, const error_category &__ecat, const string
&__what)
const error_code & code () const noexcept
system_error & operator= (const system_error &)=default
virtual const char * what () const noexcept
πΈ Detailed Description πΈ
So this is an exception type that includes an error_code value. That's the core.
It's typically used to report errors from the operating system and other low-level APIs. Very "the OS has opinions" energy, honestly.
β³ Since β³
C++11
π Member Function Documentation π
virtual const char * std::runtime_error::what () const [virtual], [noexcept], [inherited]
This one returns a C-style character string describing the general cause of the current error β and it's literally the same string that got passed to the ctor. π«Ά
Reimplemented from std::exception.
Reimplemented in std::filesystem::filesystem_error, and std::experimental::filesystem::v1::filesystem_error.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. Iconic behavior, truly.
Signing off from std::system_error(3cxx) β source/version libstdc++, and the original footer has no date printed, so we're not inventing one. ππ
π¦ 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