std::system_error(3)
π NAME π
okay so bestie, welcome to std::system_error β it's a whole exception type that comes with an error_code value attached, like a lil gift bag of "what went wrong" π
β¨ SYNOPSIS β¨
#include <system_error>
It inherits std::runtime_error. no cap.
And it gets inherited by these three icons right here:
std::experimental::filesystem::v1::filesystem_errorstd::filesystem::filesystem_errorstd::ios_base::failure
π«Ά Public Member Functions π«Ά
here's the whole roster, no skips, no cuts:
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 πΈ
An exception type that includes an error_code value. that's the whole vibe. π
Typically used to report errors from the operating system and other low-level APIs. like when the OS is being messy and you need receipts fr fr.
Since
C++11 β yeah she's been iconic for a while, not a new girl. π
π Member Function Documentation π
virtual const char * std::runtime_error::what () const [virtual], [noexcept], [inherited]
Returns a C-style character string describing the general cause of the current error β and it's literally the same string that was passed to the ctor. no rewriting, no glow-up, same string. π
Reimplemented from std::exception.
Reimplemented in std::experimental::filesystem::v1::filesystem_error, std::filesystem::filesystem_error, and std::ios_base::failure.
References what().
Referenced by what().
not me pointing out thatwhat()referenceswhat()and is referenced bywhat()π that's the recursion-flavored main character energy, we don't ask questions, we just report it exactly as it is.
π¦ Author π¦
Generated automatically by Doxygen for libstdc++ from the source code. so nobody hand-wrote this, the robot did it, and honestly? it ate. β¨
okay that's the whole page bestie, you understood it, you slayed it, go catch some errors with your error_code in hand π«ΆπΈ
this has been your girl, std::system_error(3), from the Library Functions Manual, brought to you by libstdc++ β mwah, stan the standard library πβ
π¦ where this page comes from
- arch rolling: gcc 16.2.1+r23+gd564253eb6c8-1 Β· GPL-3.0-or-later WITH GCC-exception-3.1 AND GFDL-1.3-or-later
- fedora 44: libstdc++-docs 16.2.1-2.fc44
- fedora 44: libstdc++-docs 16.2.1-3.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later AND (GPL-3.0-or-later WITH GCC-exception-3.1) AND (GPL-3.0-or-later WITH Texinfo-exception) AND (LGPL-2.1-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GCC-exception-2.0) AND (GPL-2.0-or-later WITH GNU-compiler-exception) AND BSL-1.0 AND GFDL-1.3-or-later AND Linux-man-pages-copyleft-2-para AND SunPro AND BSD-1-Clause AND BSD-2-Clause AND BSD-2-Clause-Views AND BSD-3-Clause AND BSD-4-Clause AND BSD-Source-Code AND Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 WITH LLVM-Exception) AND ZPL-2.1 AND ISC AND LicenseRef-Fedora-Public-Domain AND HP-1986 AND curl AND Martin-Birgmeier AND HPND-Markus-Kuhn AND dtoa AND SMLNJ AND AMD-newlib AND OAR AND HPND-merchantability-variant AND HPND-Intel
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms