terminate (<exception>)

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

Calls a terminate handler.

void terminate( );

The function calls a terminate handler, a function of type void. If terminate is called directly by the program, the terminate handler is the one most recently set by a call to set_terminate. If terminate is called for any of several other reasons during evaluation of a throw expression, the terminate handler is the one in effect immediately after evaluating the throw expression.

A terminate handler may not return to its caller. At program startup, the terminate handler is a function that calls abort.

See set_unexpected for an example of the use of terminate.

Header: <exception>

Namespace: std

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.