Doc #16920 [Opn->Csd]: Bad code sample for rethrowing exceptions in PEAR coding guide
| From: | brett dot bieber at gmail dot com | Date: | Sun, 20 Dec 2009 04:44:18 +0000 |
| Subject: | Doc #16920 [Opn->Csd]: Bad code sample for rethrowing exceptions in PEAR coding guide | ||
| References: | 1 | Groups: | php.pear.doc |
| Request: | Send a blank email to pear-doc+get-11885@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=16920&edit=1
ID: 16920
Updated by: brett.bieber@gmail.com
Reported By: chadd at fidelissys dot com
Summary: Bad code sample for rethrowing exceptions in PEAR
coding guide
-Status: Open
+Status: Closed
Type: Documentation Problem
Package: Documentation
PHP Version: Irrelevant
-Assigned To:
+Assigned To: saltybeagle
Roadmap Versions:
New Comment:
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: saltybeagle
This bug has been fixed in SVN.
If this was a documentation problem, the fix will appear on
pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should
be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.
Previous Comments:
------------------------------------------------------------------------
[2009-12-17 17:56:16] fidelis_cd
Description:
------------
On the page:
http://pear.php.net/manual/en/standards.errors.php
Section: "Rethrowing an exception"
The example code is missing the dollar sign in "catch (... e)"
and "throw new
...(..., e);", resulting in a parse error.
Also, these custom exceptions apparently support chaining, in
a way
incompatible with PHP 5.3's native support. This should
probably be noted,
or the sample updated.
P.S. Not that it matters, but the PHP version dropdown on the
bug report
form ends at 5.2.5, although the official release is up to 5.2.12
by now.
Expected result:
----------------
No errors (under E_STRICT|E_ALL as specified elsewhere in the
PEAR coding standards).
Actual result:
--------------
PHP Parse error: syntax error, unexpected T_STRING, expecting
T_VARIABLE in ...
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=16920&edit=1