mirror of
https://github.com/macintoshplus/doc-fr.git
synced 2026-03-27 10:22:07 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/fr/trunk@153332 c90b9560-bf6c-de11-be94-00142212c4b1
71 lines
1.7 KiB
XML
71 lines
1.7 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.6 $ -->
|
|
<!-- EN-Revision: 1.5 Maintainer: didou Status: ready -->
|
|
<refentry id="function.java-last-exception-get">
|
|
<refnamediv>
|
|
<refname>java_last_exception_get</refname>
|
|
<refpurpose>Lit la dernière exception Java</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>exception</type><methodname>java_last_exception_get</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
&warn.experimental.func;
|
|
<para>
|
|
L'exemple ci-dessous montre l'utilisation du gestionnaire d'exceptions
|
|
java depuis &php; :
|
|
<example>
|
|
<title>Gestionnaire d'exception Java</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$stack = new Java('java.util.Stack');
|
|
$stack->push(1);
|
|
|
|
// Cela doit marcher
|
|
$result = $stack->pop();
|
|
$ex = java_last_exception_get();
|
|
if (!$ex) {
|
|
echo "$result\n";
|
|
}
|
|
|
|
// Cela doit échouer (le rapport d'erreurs est supprimé par @)
|
|
$result = @$stack->pop();
|
|
$ex = java_last_exception_get();
|
|
if ($ex) {
|
|
echo $ex->toString();
|
|
}
|
|
|
|
// Efface la dernière exception
|
|
java_last_exception_clear();
|
|
?>
|
|
]]>
|
|
</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
|
|
-->
|