[PEAR-BUG] Documentation Problem #16920 [NEW]: Bad code sample for rethrowing exceptions in PEAR coding guide
[email protected] ("chadd at fidelissys dot com")
| Newsgroups | php.pear.doc,php.pear.doc |
|---|---|
| Message-ID | <[email protected]> |
From: fidelis_cd Operating system: Package version: PHP version: Irrelevant Package: Documentation Bug Type: Documentation Problem Bug description: Bad code sample for rethrowing exceptions in PEAR coding guide 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 bug report at http://pear.php.net/bugs/bug.php?id=16920&edit=1 --