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> 1000002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 1100003 1200004 <span class="comment">// O S C L _ E X C E P T I O N</span> 1300005 1400006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 1500007 1600019 <span class="preprocessor">#ifndef OSCL_EXCEPTION_H_INCLUDED</span> 1700020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_EXCEPTION_H_INCLUDED</span> 1800021 <span class="preprocessor"></span> 1900022 <span class="comment">// - - Inclusion - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span> 2000023 2100024 <span class="preprocessor">#ifndef OSCL_ERROR_H_INCLUDED</span> 2200025 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__error_8h.html">oscl_error.h</a>"</span> 2300026 <span class="preprocessor">#endif</span> 2400027 <span class="preprocessor"></span> 2500028 <span class="preprocessor">#ifndef OSCL_ERROR_IMP_H_INCLUDED</span> 2600029 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__error__imp_8h.html">oscl_error_imp.h</a>"</span> 2700030 <span class="preprocessor">#endif</span> 2800031 <span class="preprocessor"></span> 2900032 3000033 <span class="comment">// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span> 3100034 3200036 3300037 3400039 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> 3600047 { 3700048 <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>() 4000051 { 4100052 <span class="keywordflow">return</span> LeaveCode; 4200053 }; 4300054 }; 4400055 4500056 4600058 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> 4800063 <span class="preprocessor"></span> 4900064 5000066 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> 5200077 <span class="preprocessor"></span><span class="comment">//Same as above, but avoids the TLS lookup.</span> 5300078 <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> 5500080 <span class="preprocessor"></span> 5600082 5700084 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> 5900091 <span class="preprocessor"> if (_leave_status!=OsclErrNone) { _statements; }</span> 6000092 <span class="preprocessor"></span> 6100094 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> 6300100 <span class="preprocessor"> if (_leave_status!=OsclErrNone && _leave_status == _catch_value){_statements;}</span> 6400101 <span class="preprocessor"></span> 6500103 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> 6700111 <span class="preprocessor"> else if (_leave_status!=OsclErrNone && _leave_status == _catch_value){_statements;}</span> 6800112 <span class="preprocessor"></span> 6900114 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> 7100121 <span class="preprocessor"> else if (_leave_status!=OsclErrNone){ _statements;}</span> 7200122 <span class="preprocessor"></span> 7300124 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> 7500131 <span class="preprocessor"> else if (_leave_status!=OsclErrNone){OSCL_LEAVE(_leave_status);}</span> 7600132 <span class="preprocessor"></span> 7700133 7800134 <span class="preprocessor">#endif // INCLUDED_OSCL_EXCEPTION_H</span> 7900135 <span class="preprocessor"></span> 8000136 8100137 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