nn::os::ARM::SetUserExceptionHandler Function

Syntax

void SetUserExceptionHandler(
     UserExceptionHandler pHandler,
     uptr stackBottom
);

Arguments

Name Description
in pHandler Specifies the exception handler called when an exception occurs.
in stackBottom Specifies the stack to use for the exception handler. You must specify the bottom of the stack.

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 in stackBottom is used.

The instances of ExceptionInfo and ExceptionContent that are passed to pHandler are allocated from the stack specified by stackBottom. 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