blob: 4e70bd7e8eed1c8d180e5ce03a051cdeb41ce110 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>oscl_exception.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.2.18 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="modules.html">Modules</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Data Structures</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Data Fields</a> &nbsp; <a class="qindex" href="globals.html">Globals</a> &nbsp; </center>
<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>
00002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00003
00004 <span class="comment">// O S C L _ E X C E P T I O N</span>
00005
00006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span>
00007
00019 <span class="preprocessor">#ifndef OSCL_EXCEPTION_H_INCLUDED</span>
00020 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_EXCEPTION_H_INCLUDED</span>
00021 <span class="preprocessor"></span>
00022 <span class="comment">// - - Inclusion - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span>
00023
00024 <span class="preprocessor">#ifndef OSCL_ERROR_H_INCLUDED</span>
00025 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__error_8h.html">oscl_error.h</a>"</span>
00026 <span class="preprocessor">#endif</span>
00027 <span class="preprocessor"></span>
00028 <span class="preprocessor">#ifndef OSCL_ERROR_IMP_H_INCLUDED</span>
00029 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__error__imp_8h.html">oscl_error_imp.h</a>"</span>
00030 <span class="preprocessor">#endif</span>
00031 <span class="preprocessor"></span>
00032
00033 <span class="comment">// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -</span>
00034
00036
00037
00039
<a name="l00046"></a><a class="code" href="classOsclException.html">00046</a> <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> LeaveCode&gt; <span class="keyword">class </span><a class="code" href="classOsclException.html">OsclException</a>
00047 {
00048 <span class="keyword">public</span>:
<a name="l00049"></a><a class="code" href="classOsclException.html#a0">00049</a> <a class="code" href="classOsclException.html#a0">OsclException</a>() {}
<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>()
00051 {
00052 <span class="keywordflow">return</span> LeaveCode;
00053 };
00054 };
00055
00056
00058
<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>
00063 <span class="preprocessor"></span>
00064
00066
<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>
00077 <span class="preprocessor"></span><span class="comment">//Same as above, but avoids the TLS lookup.</span>
00078 <span class="comment">// param __trampimp is the OsclErrorTrapImp* for the current thread.</span>
<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>
00080 <span class="preprocessor"></span>
00082
00084
<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>
00091 <span class="preprocessor"> if (_leave_status!=OsclErrNone) { _statements; }</span>
00092 <span class="preprocessor"></span>
00094
<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>
00100 <span class="preprocessor"> if (_leave_status!=OsclErrNone &amp;&amp; _leave_status == _catch_value){_statements;}</span>
00101 <span class="preprocessor"></span>
00103
<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>
00111 <span class="preprocessor"> else if (_leave_status!=OsclErrNone &amp;&amp; _leave_status == _catch_value){_statements;}</span>
00112 <span class="preprocessor"></span>
00114
<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>
00121 <span class="preprocessor"> else if (_leave_status!=OsclErrNone){ _statements;}</span>
00122 <span class="preprocessor"></span>
00124
<a name="l00130"></a><a class="code" href="group__osclerror.html#a53">00130</a> <span class="preprocessor">#define OSCL_LAST_CATCH(_leave_status) \</span>
00131 <span class="preprocessor"> else if (_leave_status!=OsclErrNone){OSCL_LEAVE(_leave_status);}</span>
00132 <span class="preprocessor"></span>
00133
00134 <span class="preprocessor">#endif // INCLUDED_OSCL_EXCEPTION_H</span>
00135 <span class="preprocessor"></span>
00136
00137
</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small>
<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small>
</small></address>
</body>
</html>