Re: Re: Should PEAR code emit notices/warnings?

From: Date: Wed, 12 Mar 2008 03:33:37 +0000
Subject: Re: Re: Should PEAR code emit notices/warnings?
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49387@lists.php.net to get a copy of this message
On Tue, 2008-11-03 at 19:23 -0500, Gregory Beaver wrote: > Christian Schmidt wrote: > > If a PEAR package calls a native PHP function that emits a > > notice/warning, should that error be silenced using @function() or similar? > > > > Packages like Net_Socket and MDB2 silence all native errors and indicate > > error conditions only using PEAR_Error. Personally I prefer this > > approach, but Till thinks that people should rather turn display_errors > > off or use a lower error_reporting level: > > http://pear.php.net/pepr/pepr-comments-show.php?id=527 > <snip> > > Till is incorrect, coding standards forbid PEAR packages from warnings > or notices, regardless of their source. Till has a point about error suppression though. I've run into a problem in PEAR before where error suppression was used on a conditional include. The returned PEAR_Error object had a message about the driver class not being found. It took me forever to determine that the driver was being found and just had a parse error. Mike

« previous php.pear.dev (#49387) next »