Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > fc480f9d5aabed8eeaffe8ad3401a94c > files > 9365

openoffice.org-devel-doc-3.2.1-0.3mdv2010.2.i586.rpm

<html>
<head>
<title>Global Functions in Namespace cppu in Sourcefile exc_hlp.hxx</title>
<link rel="stylesheet" type="text/css" href="../../cpp.css">
</head>
<body>
<div id="adc-cppref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="1" cellspacing="0">
<tr align="center" valign="top">
<td class="navimain">&nbsp;<a href="../../index.html">Overview</a>&nbsp;</td>
<td class="navimain">&nbsp;<a href="index.html">Namespace</a>&nbsp;</td>
<td class="navimainnone">&nbsp;Class&nbsp;</td>
<td class="navimain">&nbsp;<a href="../../index-files/index-1.html">Index</a>&nbsp;</td>
<td class="navimain">&nbsp;<a href="../../help.html">Help</a>&nbsp;</td>
</tr>
</table>
<table class="navisub" cellpadding="0" cellspacing="3"></table>
<hr>
<div class="title"><h2>Global Functions in Namespace cppu<br>
in Sourcefile exc_hlp.hxx</h2>
</div><hr>
<dl class="member">
<dt class="member"><a name="getCaughtException-3420"> </a>getCaughtException</dt>
<dd class="member"><dl>
<dt class="simple">::com::sun::star::uno::<a href="../com/sun/star/uno/c-Any.html">Any</a> <strong>getCaughtException</strong>();</dt>
<dd><table class="param-table"></table>
</dd>
</dl>
<br>
</dd>
<dd class="member"><table class="flag-table" border="1" cellspacing="0">
<tr>
<td width="12%" class="flagname">virtual</td>
<td width="12%" class="flagname">abstract</td>
<td width="12%" class="flagname">const</td>
<td width="12%" class="flagname">volatile</td>
<td width="12%" class="flagname">template</td>
<td width="12%" class="flagname">static</td>
<td width="12%" class="flagname">inline</td>
<td width="12%" class="flagname">C-linkage</td>
</tr>
<tr>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
</tr>
</table>
<br>
</dd>
<dd class="member"><dl>
<dt>Summary</dt>
<dd><pre>Use this function to get the dynamic type of a caught C++-UNO exception;
completes the above function throwing exceptions generically.

</pre></dd>
<dt>Description</dt>
<dd><pre>try
{
    ...
}
catch (::com::sun::star::uno::RuntimeException &amp;)
{
    // you ought not handle RuntimeExceptions:
    throw;
}
catch (::com::sun::star::uno::Exception &amp;)
{
    ::com::sun::star::uno::Any caught( ::cppu::getCaughtException() );
    ...
}

Restrictions:
- use only for caught C++-UNO exceptions (UNOIDL defined)
- only as first statement in a catch block!
- don't do a C++ rethrow (throw;) after you have called this function
- call getCaughtException() just once in your catch block!
  (function internally uses a C++ rethrow)
  
</pre></dd>
<dt>Return</dt>
<dd><pre>
          caught UNO exception
          
</pre></dd>
<dt class="attention">ATTENTION!</dt>
<dd><pre>Caution!
          This function is limited to the same C++ compiler runtime library.
          E.g. for MSVC, this means that the catch handler code (the one
          that calls getCaughtException()) needs to use the very same
          C++ runtime library, e.g. msvcrt.dll as cppuhelper, e.g.
          cppuhelper3MSC.dll and the bridge library, e.g. msci_uno.dll.
          This is the case if all of them are compiled with the same
          compiler version.
          Background: The msci_uno.dll gets a rethrown exception out
          of the internal msvcrt.dll thread local storage (tls).
          Thus you _must_ not use this function if your code needs to run
          in newer UDK versions without being recompiled, because those
          newer UDK (-&gt; OOo versions) potentially use newer C++ runtime
          libraries which most often become incompatible!
          
          But this function ought to be usable for most OOo internal C++-UNO
          development, because the whole OOo code base is compiled using the
          same C++ compiler (and linking against one runtime library).
</pre></dd>
</dl>
</dd>
</dl>
<hr>
<dl class="member">
<dt class="member"><a name="throwException-3419"> </a>throwException</dt>
<dd class="member"><dl>
<dt class="simple">void <strong>throwException</strong>(</dt>
<dd><table class="param-table">
<tr>
<td>const ::com::sun::star::uno::<a href="../com/sun/star/uno/c-Any.html">Any</a> &amp; </td>
<td> rExc )</td>
</tr>
<tr>
<td/><td> throw( ::com::sun::star::uno::<a href="../../../../common/ref/com/sun/star/uno/Exception.html">Exception</a> );</td>
</tr>
</table>
</dd>
</dl>
<br>
</dd>
<dd class="member"><table class="flag-table" border="1" cellspacing="0">
<tr>
<td width="12%" class="flagname">virtual</td>
<td width="12%" class="flagname">abstract</td>
<td width="12%" class="flagname">const</td>
<td width="12%" class="flagname">volatile</td>
<td width="12%" class="flagname">template</td>
<td width="12%" class="flagname">static</td>
<td width="12%" class="flagname">inline</td>
<td width="12%" class="flagname">C-linkage</td>
</tr>
<tr>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
<td class="flagno">NO</td>
</tr>
</table>
<br>
</dd>
<dd class="member"><dl>
<dt>Description</dt>
<dd><pre>This function throws the exception given by rExc.  The given value has to
be of typeclass EXCEPTION and must be dervived from or of
type com.sun.star.uno.Exception.

</pre></dd>
<dt>Parameters</dt>
<dd><table border="0" width="100%" cellpadding="3" cellspacing="0" class="expl-table">
<tr>
<td width="15%" style="vertical-align:top; font-weight:bold">rExc</td>
<td><pre><pre>       exception to be thrown.
</pre></pre></td>
</tr>
</table>
</dd>
</dl>
</dd>
</dl>
<hr>
<a href="#_top_" class="objchapter">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p>

</div> <!-- id="adc-cppref" -->
</body>

</html>