Files
doc-fr/reference/java/functions/java-last-exception-get.xml
Hartmut Holzgraefe b8daeaab85 banana-split
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@78204 c90b9560-bf6c-de11-be94-00142212c4b1
2002-04-15 00:40:38 +00:00

61 lines
1.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- splitted from ./fr/functions/java.xml, last change in rev 1.1 -->
<!-- last change to 'java-last-exception-get' in en/ tree in rev 1.1 -->
<refentry id="function.java-last-exception-get">
<refnamediv>
<refname>java_last_exception_get</refname>
<refpurpose>Lit la derni&egrave;re exception Java</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>exception</type><methodname>java_last_exception_get</methodname>
<void/>
</methodsynopsis>
<para>
L'exemple ci-dessous montre l'utilisation du gestionnaire d'exceptions
java :
<example>
<title>Gestionnaire d'exception Java</title>
<programlisting role="php">
&lt;?php
$stack = new Java("java.util.Stack");
$stack-&gt;push(1);
// Cela doit marcher
$result = $stack-&gt;pop();
$ex = java_last_exception_get();
if (!$ex) print "$result\n";
// Cela doit &eacute;chouer (le rapport d'erreurs est supprim&eacute; par &#62;)
$result = @$stack-&gt;pop();
$ex = java_last_exception_get();
if ($ex) print $ex-&gt;toString();
// Efface la derni&egrave;re exception
java_last_exception_clear();
?&gt;
</programlisting>
</example>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->