Exceptions
Diagnostics
Collaboration diagram for Exceptions:

## Classes

class | __cxxabiv1::__forced_unwind
struct | __gnu_cxx::forced_error
class | std::__exception_ptr::exception_ptr
class | std::bad_alloc
class | std::bad_cast
class | std::bad_function_call
class | std::bad_typeid
class | std::bad_weak_ptr
class | std::domain_error
class | std::exception
class | std::experimental::fundamentals_v1::bad_any_cast
class | std::experimental::fundamentals_v1::bad_optional_access
class | std::future_error
class | std::invalid_argument
class | std::ios_base::failure
class | std::length_error
class | std::logic_error
class | std::nested_exception
class | std::out_of_range
class | std::overflow_error
class | std::range_error
class | std::regex_error
class | std::runtime_error
class | std::system_error
class | std::underflow_error

## Typedefs

template<typename _Tp >
using | std::__rethrow_if_nested_cond = typename enable_if< __and_< is_polymorphic< _Tp >, __or_< __not_< is_base_of< nested_exception, _Tp > >, is_convertible< _Tp *, nested_exception * > > >::value >::type

## Functions

template<typename _Ex >
__rethrow_if_nested_cond< _Ex > | std::__rethrow_if_nested_impl (const _Ex *__ptr)
void | std::__rethrow_if_nested_impl (const void *)
template<typename _Tp >
void | std::__throw_with_nested_impl (_Tp &&__t, false_type)
template<typename _Tp >
void | std::__throw_with_nested_impl (_Tp &&__t, true_type)
void | __gnu_cxx::__verbose_terminate_handler ()
exception_ptr | std::current_exception () noexcept
template<typename _Ex >
exception_ptr | std::make_exception_ptr (_Ex __ex) noexcept
void | std::rethrow_exception (exception_ptr) __attribute__((__noreturn__))
template<typename _Ex >
void | std::rethrow_if_nested (const _Ex &__ex)
template<typename _Tp >
void | std::throw_with_nested (_Tp &&__t)

## Detailed Description

Classes and functions for reporting errors via exceptions.

## Typedef Documentation

## __rethrow_if_nested_cond

template<typename _Tp >

using std::__rethrow_if_nested_cond = typedef typename enable_if< __and_<is_polymorphic<_Tp>, __or_<__not_<is_base_of<nested_exception, _Tp> >, is_convertible<_Tp*, nested_exception*> >>::value >::type

Definition at line 128 of file nested_exception.h.

## Function Documentation

## __rethrow_if_nested_impl() [1/2]

template<typename _Ex >

__rethrow_if_nested_cond< _Ex > std::__rethrow_if_nested_impl | ( | const _Ex * | __ptr | ) |

inline

Definition at line 137 of file nested_exception.h.

## __rethrow_if_nested_impl() [2/2]

void std::__rethrow_if_nested_impl | ( | const void * |  | ) |

inline

Definition at line 145 of file nested_exception.h.

## __throw_with_nested_impl() [1/2]

template<typename _Tp >

void std::__throw_with_nested_impl | ( | _Tp && | __t,
|  | false_type |
| ) |  |

inline

Definition at line 106 of file nested_exception.h.

## __throw_with_nested_impl() [2/2]

template<typename _Tp >

void std::__throw_with_nested_impl | ( | _Tp && | __t,
|  | true_type |
| ) |  |

inline

Definition at line 97 of file nested_exception.h.

## __verbose_terminate_handler()

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)
__gnu_cxx::__verbose_terminate_handler
void __verbose_terminate_handler()
A replacement for the standard terminate_handler which prints more information about the terminating ...
std::set_terminate
terminate_handler set_terminate(terminate_handler) noexcept
Takes a new handler function as an argument, returns the old function.

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.

## current_exception()

exception_ptr std::current_exception | ( |  | ) |

noexcept

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::make_exception_ptr().

## make_exception_ptr()

template<typename _Ex >

exception_ptr std::make_exception_ptr | ( | _Ex | __ex | ) |

noexcept

Obtain an exception_ptr pointing to a copy of the supplied object.

Definition at line 183 of file exception_ptr.h.

References std::current_exception().

## rethrow_exception()

void std::rethrow_exception | ( | exception_ptr |  | ) |

Throw the object pointed to by the exception_ptr.

References std::rethrow_exception().

Referenced by std::rethrow_exception().

## rethrow_if_nested()

template<typename _Ex >

void std::rethrow_if_nested | ( | const _Ex & | __ex | ) |

inline

If `__ex` is derived from nested_exception, `__ex.rethrow_nested()`.

Definition at line 151 of file nested_exception.h.

References std::__addressof().

## throw_with_nested()

template<typename _Tp >

void std::throw_with_nested | ( | _Tp && | __t | ) |

inline

If `__t` is derived from nested_exception, throws `__t`. Else, throws an implementation-defined object derived from both.

Definition at line 114 of file nested_exception.h.