For Programmers: Free Programming Magazines  


Home > Archive > PHP Documentation > October 2004 > cvs: phpdoc /en/language/oop5 exceptions.xml









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: phpdoc /en/language/oop5 exceptions.xml
Aidan Lister

2004-10-10, 8:55 am

aidan Sun Oct 10 03:48:47 2004 EDT

Modified files:
/phpdoc/en/language/oop5 exceptions.xml
Log:
Made the example a little simpler.

http://cvs.php.net/diff.php/phpdoc/...1.7&r2=1.8&ty=u
Index: phpdoc/en/language/oop5/exceptions.xml
diff -u phpdoc/en/language/oop5/exceptions.xml:1.7 phpdoc/en/language/oop5/exceptions.xml:1.8
--- phpdoc/en/language/oop5/exceptions.xml:1.7 Sat Oct 2 05:40:50 2004
+++ phpdoc/en/language/oop5/exceptions.xml Sun Oct 10 03:48:42 2004
@@ -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 @@
$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>
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com