Re: Re: cvs: pear-core /PEAR
| From: | Sergio Carvalho | Date: | Mon, 06 Sep 2004 15:27:44 +0000 |
| Subject: | Re: Re: cvs: pear-core /PEAR | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.dev php.pear.core |
| Request: | Send a blank email to pear-dev+get-33247@lists.php.net to get a copy of this message | ||
Lukas Smith wrote:
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Sergio Carvalho wrote:Greg's current model is designed the other way around. I personally don't have a formed opinion on warning handling -- other than treating PHP's warnings, I really don't use them in my code and actually find the current PHP4 model more of a nuisance than an useful tool. I don't know how are warnings currently used.Hmm, I can see how this warning discussion can get really interesting. This is potentially a nice idea. If I read you correctly, you'd do something like: PEAR_Warning::allow('Some_Package_Downcast'); Some_Package_Class::method(); And then, inside the method, you'd have the regular PEAR_Warning::add. If an unallowed warning is fired, it gets automatically upgraded to an exception, right?err, it should be the other way around!
but isnt this another case of where the exception backtrace will get "polluted" with non relevant data?Here, I don't find it a big problem. The backtrace will start in PEAR_Warning::add, but that's how things happened: a Warning was fired, but since it was disallowed, it was upgraded to an exception.
seems like more and more this fact is becoming a show stopper (as it already was for the turn pear_errors into exceptions on demand php4/php5 compatibility thing). maybe its time we address this?How is it a showstopper? Cheers, Sérgio
regards, Lukas
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc