1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3 <title>oscl_exception.h Source File</title> 4 <link href="doxygen.css" rel="stylesheet" type="text/css"> 5 </head><body> 6 <!-- Generated by Doxygen 1.2.18 --> 7 <center> 8 <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9 <hr><h1>oscl_exception.h</h1><a href="oscl__exception_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span> 10 00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 11 00003 12 00004 <span class="comment">// O S C L _ E X C E P T I O N</span> 13 00005 14 00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 15 00007 16 00019 <span class="preprocessor">#ifndef OSCL_EXCEPTION_H_INCLUDED</span> 17 00020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_EXCEPTION_H_INCLUDED</span> 18 00021 <span class="preprocessor"></span> 19 00022 <span class="comment">// - - Inclusion - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span> 20 00023 21 00024 <span class="preprocessor">#ifndef OSCL_ERROR_H_INCLUDED</span> 22 00025 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__error_8h.html">oscl_error.h</a>"</span> 23 00026 <span class="preprocessor">#endif</span> 24 00027 <span class="preprocessor"></span> 25 00028 <span class="preprocessor">#ifndef OSCL_ERROR_IMP_H_INCLUDED</span> 26 00029 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__error__imp_8h.html">oscl_error_imp.h</a>"</span> 27 00030 <span class="preprocessor">#endif</span> 28 00031 <span class="preprocessor"></span> 29 00032 30 00033 <span class="comment">// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span> 31 00034 32 00036 33 00037 34 00039 35 <a name="l00046"></a><a class="code" href="classOsclException.html">00046</a> <span class="keyword">template</span> <<span class="keywordtype">int</span> LeaveCode> <span class="keyword">class </span><a class="code" href="classOsclException.html">OsclException</a> 36 00047 { 37 00048 <span class="keyword">public</span>: 38 <a name="l00049"></a><a class="code" href="classOsclException.html#a0">00049</a> <a class="code" href="classOsclException.html#a0">OsclException</a>() {} 39 <a name="l00050"></a><a class="code" href="classOsclException.html#d0">00050</a> <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classOsclException.html#d0">getLeaveCode</a>() 40 00051 { 41 00052 <span class="keywordflow">return</span> LeaveCode; 42 00053 }; 43 00054 }; 44 00055 45 00056 46 00058 47 <a name="l00062"></a><a class="code" href="group__osclerror.html#a46">00062</a> <span class="preprocessor">#define OSCL_LEAVE(_leave_status) OsclError::Leave(_leave_status)</span> 48 00063 <span class="preprocessor"></span> 49 00064 50 00066 51 <a name="l00076"></a><a class="code" href="group__osclerror.html#a47">00076</a> <span class="preprocessor">#define OSCL_TRY(_leave_status,_statements) _PV_TRAP(_leave_status,_statements)</span> 52 00077 <span class="preprocessor"></span><span class="comment">//Same as above, but avoids the TLS lookup.</span> 53 00078 <span class="comment">// param __trampimp is the OsclErrorTrapImp* for the current thread.</span> 54 <a name="l00079"></a><a class="code" href="group__osclerror.html#a48">00079</a> <span class="preprocessor">#define OSCL_TRY_NO_TLS(__trapimp,_leave_status,_statements) _PV_TRAP_NO_TLS(__trapimp,_leave_status,_statements)</span> 55 00080 <span class="preprocessor"></span> 56 00082 57 00084 58 <a name="l00090"></a><a class="code" href="group__osclerror.html#a49">00090</a> <span class="preprocessor">#define OSCL_FIRST_CATCH_ANY(_leave_status, _statements) \</span> 59 00091 <span class="preprocessor"> if (_leave_status!=OsclErrNone) { _statements; }</span> 60 00092 <span class="preprocessor"></span> 61 00094 62 <a name="l00099"></a><a class="code" href="group__osclerror.html#a50">00099</a> <span class="preprocessor">#define OSCL_FIRST_CATCH( _leave_status, _catch_value, _statements) \</span> 63 00100 <span class="preprocessor"> if (_leave_status!=OsclErrNone && _leave_status == _catch_value){_statements;}</span> 64 00101 <span class="preprocessor"></span> 65 00103 66 <a name="l00110"></a><a class="code" href="group__osclerror.html#a51">00110</a> <span class="preprocessor">#define OSCL_CATCH( _leave_status, _catch_value, _statements) \</span> 67 00111 <span class="preprocessor"> else if (_leave_status!=OsclErrNone && _leave_status == _catch_value){_statements;}</span> 68 00112 <span class="preprocessor"></span> 69 00114 70 <a name="l00120"></a><a class="code" href="group__osclerror.html#a52">00120</a> <span class="preprocessor">#define OSCL_CATCH_ANY(_leave_status,_statements) \</span> 71 00121 <span class="preprocessor"> else if (_leave_status!=OsclErrNone){ _statements;}</span> 72 00122 <span class="preprocessor"></span> 73 00124 74 <a name="l00130"></a><a class="code" href="group__osclerror.html#a53">00130</a> <span class="preprocessor">#define OSCL_LAST_CATCH(_leave_status) \</span> 75 00131 <span class="preprocessor"> else if (_leave_status!=OsclErrNone){OSCL_LEAVE(_leave_status);}</span> 76 00132 <span class="preprocessor"></span> 77 00133 78 00134 <span class="preprocessor">#endif // INCLUDED_OSCL_EXCEPTION_H</span> 79 00135 <span class="preprocessor"></span> 80 00136 81 00137 82 </pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 83 <address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 84 </small></address> 85 </body> 86 </html> 87