Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Calls terminate or function you specify using set_unexpected.

void unexpected( void );


The unexpected routine is not used with the current implementation of C++ exception handling. unexpected calls terminate by default. You can change this default behavior by writing a custom termination function and calling set_unexpected with the name of your function as its argument. unexpected calls the last function given as an argument to set_unexpected.


Routine Required header Compatibility
unexpected <eh.h> ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.


All versions of the C run-time libraries.

See Also

Exception Handling Routines | abort | _set_se_translator | set_terminate | set_unexpected | terminate | Run-Time Routines and .NET Framework Equivalents

© 2016 Microsoft