Re: Re: Should PEAR code emit notices/warnings?
| From: | Christian Schmidt | Date: | Thu, 13 Mar 2008 20:03:13 +0000 |
| Subject: | Re: Re: Should PEAR code emit notices/warnings? | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49419@lists.php.net to get a copy of this message | ||
till wrote:
WRT <http://pear.php.net/manual/en/standards.errors.php> I am not sure what kind of logging is expected instead of the "Warn/Log code goes here" comment in example 4-3?Till is incorrect, coding standards forbid PEAR packages from warnings or notices, regardless of their source.On there? Couldn't really find it. http://pear.php.net/manual/en/standards.errors.php I think it is implied by <http://pear.php.net/manual/en/standards.e_strict.php>, but I think it deserved mentioning on the other page as well.
Anyway, even if the package is not supposed to "issue" a notice or warning, what about implementing a logger to catch them? A custom error handler can be used to catch all errors, also those under the current error_reporting threshold. The handler should just omit the usual "if (!($errno & error_reporting()) return;".Christian