mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 08:58:56 +00:00
Made the example a little simpler.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@170135 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
18557a4d79
commit
5dfa4e5379
1 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.7 $ -->
|
||||
<!-- $Revision: 1.8 $ -->
|
||||
<sect1 id="language.oop5.exceptions">
|
||||
<title>Exceptions</title>
|
||||
|
||||
|
@ -26,13 +26,15 @@ try {
|
|||
$error = 'Always throw this error';
|
||||
throw new Exception($error);
|
||||
|
||||
// code following an exception isn't executed.
|
||||
// Code following an exception is not executed.
|
||||
echo 'Never executed';
|
||||
|
||||
} catch (Exception $e) {
|
||||
echo "Caught exception: ", $e, "\n";
|
||||
echo 'Caught exception: ', $e->getMessage(), "\n";
|
||||
}
|
||||
|
||||
// Continue execution
|
||||
echo 'Hello World';
|
||||
?>
|
||||
]]>
|
||||
</programlisting>
|
||||
|
|
Loading…
Reference in a new issue