std::terminate_handler - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# std::terminate_handler

From cppreference.com
< cpp‎ | error

Defined in header `<exception>` |  |
typedef void (*terminate_handler)(); |  |

`std::terminate_handler` is the function pointer type (pointer to function that takes no arguments and returns void), which is installed and queried by the functions std::set_terminate and std::get_terminate and called by std::terminate.

The C++ implementation provides a default `std::terminate_handler` function, which calls std::abort(). If the null pointer value is installed (by means of std::set_terminate), the implementation may restore the default handler instead.

### [edit] See also

terminate | function called when exception handling fails (function) [edit]
set_terminate | changes the function to be called by std::terminate (function) [edit]
get_terminate (C++11) | obtains the current terminate_handler (function) [edit]

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/error/terminate_handler&oldid=57414"