__gnu_cxx::forced_error(3)
πΈ __gnu_cxx::forced_error β the "let's break it on purpose" exception β¨
okay bestie, welcome to section 3 of the Library Functions Manual, and yes we're doing a whole deep dive on the little exception that exists purely so the test suite can vibe-check your exception safety π
β¨ NAME β¨
__gnu_cxx::forced_error β thrown by utilities for testing exception safety. that's it. that's the whole job. iconic honestly π
π SYNOPSIS π
#include <throw_allocator.h>
Inherits std::exception.
π Public Member Functions π
virtual constexpr const char * what () const noexcept
π¦ Detailed Description π¦
So basically: this thing gets thrown by utilities for testing exception safety. it's not here to ruin your day, it's here to deliberately ruin your day so you can prove your code survives the day getting ruined. it's giving chaos gremlin with a purpose, fr fr π
π Member Function Documentation π
β virtual constexpr const char * std::exception::what () const [inline], [constexpr], [virtual], [noexcept], [inherited] β
Returns a C-style character string describing the general cause of the current error. yes queen, give us the error lore β¨
Heads up bestie: this one is inherited, not reimplemented here β it's[inline],[constexpr],[virtual]and[noexcept], all of that energy at once π
Reimplemented in std::bad_alloc, std::bad_cast, std::bad_exception, std::bad_function_call, std::bad_typeid, std::bad_weak_ptr, std::experimental::filesystem::v1::filesystem_error, std::experimental::fundamentals_v1::bad_any_cast, std::filesystem::filesystem_error, std::future_error, std::ios_base::failure, std::logic_error, and std::runtime_error. that's the whole squad showing up to the party π«Ά
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. no human author, just a robot doing its little documentation dance π€β¨
mwah, that's the whole page bestie β brought to you by the fine folks over at libstdc++, auto-generated by Doxygen, no cap π
π¦ 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
- centos-stream 10: gcc-toolset-16-libstdc++-docs 16.2.1-1.3.el10 Β· 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
- 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