exception File Reference


Detailed Description

This header defines several types and functions relating to the handling of exceptions in a C++ program.

Definition in file exception.

Go to the source code of this file.

Namespaces

Typedefs

Functions


Typedef Documentation

typedef void(* terminate_handler)()
 

If you write a replacement terminate handler, it must be of this type.

Definition at line 76 of file exception.

typedef void(* unexpected_handler)()
 

If you write a replacement unexpected handler, it must be of this type.

Definition at line 78 of file exception.


Function Documentation

void __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++/19_diagnostics/howto.html#4

In 3.4 and later, this is on by default.

terminate_handler set_terminate terminate_handler   )  throw ()
 

Takes a new handler function as an argument, returns the old function.

unexpected_handler set_unexpected unexpected_handler   )  throw ()
 

Takes a new handler function as an argument, returns the old function.

void 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 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 basic_ostream::sentry::~sentry().

void unexpected  ) 
 

The runtime will call this function if an exception is thrown which violates the function's exception specification.


Generated on Sat Apr 2 13:54:44 2005 for libstdc++ source by  doxygen 1.4.0