nn::os::ARM::SetUserExceptionHandler Function

Syntax

template <typename T>
void SetUserExceptionHandler(
     UserExceptionHandler pHandler,
     T * pStack
);

Template Arguments

Name Description
T Stack type.

Arguments

Name Description
in pHandler Specifies the exception handler called when an exception occurs.
in pStack Specifies the stack to use for the exception handler.

Return Values

None.

Description

Sets the exception handler.

When an exception handler is specified and an exception occurs, the function specified by the pHandler parameter is called in the context of the thread where the exception occurred. The stack specified by pStack is used.

The instances of ExceptionInfo and ExceptionContent that are passed to pHandler are allocated from the stack specified by pStack. The minimum stack size, therefore, must be sizeof(ExceptionContext) + sizeof(ExceptionInfo).

Note that special processing, such as disabling interrupts, is not used when calling the exception handler. The exception handler stack breaks if an exception occurs during exception handling.

Note that the exception handler cannot be called in the debug environment.

Revision History

2010/09/16
Added mention that the exception handler is not called in the debug environment.
2010/08/16
Initial version.

CONFIDENTIAL