1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../../../css/manpage.css" type="text/css" /> 7<title>SetUserExceptionHandler</title> 8 </head> 9 <body> 10<h1><CODE><a href="../../../nn/Overview.html">nn</a>::<a href="../../../nn/os/Overview.html">os</a>::<a href="../../../nn/os/ARM/Overview.html">ARM</a>::SetUserExceptionHandler</CODE> Function</h1> 11<h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14template <typename T> 15void SetUserExceptionHandler( 16 <a href="../../../nn/os/ARM/UserExceptionHandler.html">UserExceptionHandler</a> pHandler, 17 T * pStack 18); 19</pre> 20 </div> 21<h2>Template Arguments</h2> 22 <div class="section"> 23 <table class="arguments"> 24 <thead> 25 <tr> 26<th>Name</th> 27<td>Description</td> 28 </tr> 29 </thead> 30 <tr> 31<th>T</th> 32<td>Stack type.</td> 33 </tr> </table> 34 </div> 35<h2>Arguments</h2> 36 <div class="section"> 37 <table class="arguments"> 38 <thead> 39 <tr> 40 <td width="15" /> 41<th>Name</th> 42<td>Description</td> 43 </tr> 44 </thead> 45 <tr> 46<td>in</td> 47<th>pHandler</th> 48<td>Specifies the exception handler called when an exception occurs.</td> 49 </tr> 50 <tr> 51<td>in</td> 52<th>pStack</th> 53<td>Specifies the stack to use for the exception handler.</td> 54 </tr> </table> 55 </div> 56<h2>Return Values</h2> 57 <div class="section"> 58None. 59 </div> 60<h2>Description</h2> 61 <div class="section"> 62<p>Sets the exception handler.</p><p>When an exception handler is specified and an exception occurs, the function specified by the <SPAN class="argument">pHandler</SPAN> parameter is called in the context of the thread where the exception occurred. The stack specified by <SPAN class="argument">pStack</SPAN> is used.</p><p>The instances of <a href="../../../nn/os/ARM/ExceptionInfo/Overview.html"><CODE>ExceptionInfo</CODE></a> and <a href="../../../nn/os/ARM/ExceptionContext/Overview.html"><CODE>ExceptionContent</CODE></a> that are passed to <SPAN class="argument">pHandler</SPAN> are allocated from the stack specified by <SPAN class="argument">pStack</SPAN>. The minimum stack size, therefore, must be <CODE>sizeof(ExceptionContext) + sizeof(ExceptionInfo)</CODE>.</p><p>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.</p><p>Note that the exception handler cannot be called in the debug environment.</p><!-- write here --></div> 63<h2>Revision History</h2> 64 <div class="section"> 65 <dl class="history"> 66 <dt>2010/09/16</dt> 67<dd>Added mention that the exception handler is not called in the debug environment.<br /> 68 </dd> 69 <dt>2010/08/16</dt> 70<dd>Initial version.<br /> 71 </dd> 72 </dl> 73 </div> 74 <hr><p>CONFIDENTIAL</p></body> 75</html> 76