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:
Aidan Lister 2004-10-10 07:48:42 +00:00
parent 18557a4d79
commit 5dfa4e5379

View file

@ -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>