Exceptions(3)
πΈ Exceptions(3) πΈ
Welcome to Exceptions(3) from the Library Functions Manual, bestie! This is the libstdc++ page all about exceptions β classes, typedefs, functions, the whole iconic lineup. π
πΈ NAME πΈ
Exceptions β that's the name. The original NAME line is literally just Exceptions -, so no extra description here, periodt. π
π Classes π
Okay so here's the entire roster β every single class, no skips. Some have blurbs, some are just names, and I kept it all. π«Ά
class __cxxabiv1::__forced_unwindβ thrown as part of forced unwinding. It's a magic placeholder class that can be caught by reference to recognize forced unwinding. β¨struct __gnu_cxx::forced_exception_errorβ thrown bythrow_allocator.class std::bad_allocβ exception possibly thrown bynew.bad_alloc(or classes derived from it) is used to report allocation errors from the throwing forms ofnew. π₯class std::bad_castβ thrown during incorrect typecasting. If you attempt an invaliddynamic_castexpression, an instance of this class (or something derived from this class) is thrown.class std::bad_exceptionclass std::bad_typeidβ thrown when aNULLpointer in atypeidexpression is used.class std::domain_errorclass std::exceptionβ base class for all library exceptions. πclass std::invalid_argumentclass std::ios_base::ios_base::failureβ these are thrown to indicate problems with io. The original also drops the section ref27.4.2.1.1 Class ios_base::failure.class std::length_errorclass std::lock_errorβ thrown to indicate errors with lock operations.class std::logic_errorβ one of two subclasses of exception.class std::out_of_rangeclass std::overflow_errorclass std::range_errorclass std::regex_errorβ a regular expression exception class. The regular expression library throws objects of this class on error.class std::runtime_errorβ one of two subclasses of exception.class std::system_errorβ thrown to indicate error code of underlying system.class std::underflow_error
π¦ Typedefs π¦
typedef void(* std::terminate_handler )()typedef void(* std::unexpected_handler )()
β Functions β
void __gnu_cxx::__verbose_terminate_handler ()template<typename _Ex > exception_ptr std::copy_exception (_Ex __ex) throw ()exception_ptr std::current_exception () throw ()void std::rethrow_exception (exception_ptr) __attribute__((__noreturn__))terminate_handler std::set_terminate (terminate_handler) throw ()unexpected_handler std::set_unexpected (unexpected_handler) throw ()void std::terminate () __attribute__((__noreturn__))bool std::uncaught_exception () throw ()void std::unexpected () __attribute__((__noreturn__))
π Detailed Description π
Classes and functions for reporting errors via exception classes. That's the whole detailed description, bestie. Slay. π
π Typedef Documentation π
typedef void(* std::terminate_handler)()
If you write a replacement terminate handler, it must be of this type. Definition at line 86 of file exception.
typedef void(* std::unexpected_handler)()
If you write a replacement unexpected handler, it must be of this type. Definition at line 89 of file exception.
π₯ Function Documentation π₯
void __gnu_cxx::__verbose_terminate_handler ()
A replacement for the standard terminate_handler which prints more information about the terminating exception (if any) on stderr.
Call:
std::set_terminate(__gnu_cxx::__verbose_terminate_handler)
to use. For more info, see http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt02ch06s02.html.
In 3.4 and later, this is on by default. β¨
template<typename _Ex > exception_ptr std::copy_exception (_Ex __ex) throw () [inline]
Obtain an exception_ptr pointing to a copy of the supplied object. Definition at line 159 of file exception_ptr.h. References std::current_exception().
exception_ptr std::current_exception () throw ()
Obtain an exception_ptr to the currently handled exception. If there is none, or the currently handled exception is foreign, return the null value. Referenced by std::copy_exception().
void std::rethrow_exception (exception_ptr)
Throw the object pointed to by the exception_ptr.
terminate_handler std::set_terminate (terminate_handler) throw ()
Takes a new handler function as an argument, returns the old function.
unexpected_handler std::set_unexpected (unexpected_handler) throw ()
Takes a new handler function as an argument, returns the old function.
void std::terminate ()
The runtime will call this function if exception handling must be abandoned for any reason. It can also be called by the user.
bool std::uncaught_exception () throw ()
[18.6.4]/1: 'Returns true after completing evaluation of a throw-expression until either completing initialization of the exception-declaration in the matching handler or entering unexpected() due to the throw; or after entering terminate() for any reason other than an explicit call to terminate(). [Note: This includes stack unwinding [15.2]. end note]' 2: 'When uncaught_exception() is true, throwing an exception can result in a call of terminate() (15.5.1).'
Referenced by std::basic_ostream< _CharT, _Traits >::basic_ostream::sentry::~sentry().
void std::unexpected ()
The runtime will call this function if an exception is thrown which violates the function's exception specification.
π Author π
Generated automatically by Doxygen for libstdc++ from the source code. Not a human author, just Doxygen doing its thing. π
And that's the whole Exceptions(3) page, bestie! This one's from libstdc++, dated 21 Apr 2009, and it's Exceptions(3) β periodt. πβ¨π
π¦ where this page comes from
- nixpkgs unstable: std-man-pages 4.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms