SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND


Platform::Runtime
Class TerminateExceptionHandler

NonCopyableType
   |
   +-TerminateExceptionHandler

Implemented in:
Platform.Runtime.TerminateExceptionHandler.h

class TerminateExceptionHandler:
private NonCopyableType

Sets the specified global terminate exception handler in the current scope. The previously installed error handler is preserved and restored at the end of the scope.

Terminate exception handler is called by the C++ language run-time in certain exceptional circumstances, for instance when the exception handling mechanism cannot find a handler for a thrown exception.

The default terminate exception handler uses appAbort to terminate the application.

A terminate exception handler function must not return.

Remarks:
not thread safe, use with caution in a multithreaded environment

Constructor Summarycollapse
TerminateExceptionHandler(std::terminate_handler handler = defaultHandler)
          Preserves the currently installed global terminate exception handler and installs the specified one for the current scope.
~TerminateExceptionHandler()
          Restores the global terminate exception handler to the previously saved state.

 

Constructor Detail

TerminateExceptionHandler[nothrow, inline]

TerminateExceptionHandler(std::terminate_handler handler = defaultHandler)

Preserves the currently installed global terminate exception handler and installs the specified one for the current scope.

Parameters:
handler - the terminate exception handler function

~TerminateExceptionHandler[nothrow, inline]

~TerminateExceptionHandler()

Restores the global terminate exception handler to the previously saved state.



SUMMARY:  INNER | FIELD | CONSTR | METHOD | FRIEND DETAIL:  FIELD | CONSTR | METHOD | FRIEND