php-doc-en/reference/java/functions/java-last-exception-get.xml
Gabor Hojtsy 25ab3fcec2 Adding experimental notices to all functions and the extension docs.
The EXPERIMENTAL file is there in the source. Adding see also
java_last_exception_get() to java_last_exception_clear().


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@89468 c90b9560-bf6c-de11-be94-00142212c4b1
2002-07-22 13:57:00 +00:00

67 lines
1.6 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/java.xml, last change in rev 1.1 -->
<refentry id="function.java-last-exception-get">
<refnamediv>
<refname>java_last_exception_get</refname>
<refpurpose>Get last Java exception</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>exception</type><methodname>java_last_exception_get</methodname>
<void/>
</methodsynopsis>
&warn.experimental.func;
<para>
The following example demonstrates the usage of Java's exception
handler from within PHP:
<example>
<title>Java exception handler</title>
<programlisting role="php">
<![CDATA[
<?php
$stack = new Java('java.util.Stack');
$stack->push(1);
// This should succeed
$result = $stack->pop();
$ex = java_last_exception_get();
if (!$ex) print "$result\n";
// This should fail (error suppressed by @)
$result = @$stack->pop();
$ex = java_last_exception_get();
if ($ex) print $ex->toString();
// Clear last 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
-->