svn: /pear/peardoc/trunk/en/chapters/ standards.xml

[email protected] (Brett Bieber) Sun, 20 Dec 2009 03:44:02 +0000
Newsgroups php.pear.doc
Message-ID <[email protected]>
saltybeagle                              Sun, 20 Dec 2009 03:44:02 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=292353

Log:
Doc Bug #16920 Bad code sample for rethrowing exceptions in PEAR coding guide

Bug: http://pear.php.net/bugs/16920 (unknown) 
      
Changed paths:
    U   pear/peardoc/trunk/en/chapters/standards.xml

Modified: pear/peardoc/trunk/en/chapters/standards.xml
===================================================================
--- pear/peardoc/trunk/en/chapters/standards.xml	2009-12-20 01:36:55 UTC (rev 292352)
+++ pear/peardoc/trunk/en/chapters/standards.xml	2009-12-20 03:44:02 UTC (rev 292353)
@@ -1263,7 +1263,7 @@
         try {
             $this->connectDB($dsn);
             return;
-        } catch (Example_Datasource_Exception e) {
+        } catch (Example_Datasource_Exception $e) {
             // Some warning/logging code recording the failure
             // to connect to one of the databases
         }
@@ -1301,7 +1301,7 @@
 {
     try {
         $this->config = $conf->parse();
-    } catch (Config_Parse_Exception e) {
+    } catch (Config_Parse_Exception $e) {
         // Warn/Log code goes here
         // Perform incomplete recovery
         $this->config = $this->defaultConfig;
@@ -1442,8 +1442,8 @@
 {
     try {
         return $this->divide($retailPrice, 1 + $taxRate);
-    } catch (Example_Aritmetic_Exception e) {
-        throw new Example_Tax_Exception('Invalid tax rate.', e);
+    } catch (Example_Aritmetic_Exception $e) {
+        throw new Example_Tax_Exception('Invalid tax rate.', $e);
     }
 }
           ]]>