Re: ErrorStack
| From: | Lukas Smith | Date: | Sat, 05 Feb 2005 15:24:45 +0000 |
| Subject: | Re: ErrorStack | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-35962@lists.php.net to get a copy of this message | ||
greg@chiaraquartet.net wrote:
Lukas Smith wrote:I really think it would make sense to have this available as a callback provided by ErrorStack. Its the main reason why we dont need Exceptions in PHP :-) regards, LukasHi Greg, I am having trouble figureing out the equivalent to expectError()/popExpectError() in ErrorStack. Specifically I want to know how I can disable global error handlers locally. regards, LukasHi Lukas, I'm out of town, and there is some weird firewall preventing all access to SMTP servers (stupid "security"), so I'm forced to use a web interface to do this. ErrorStack is structured around callbacks. If you want to temporarily override callbacks, use pushCallback()/popCallback() to pass in a callback that simply returns PEAR_ERRORSTACK_IGNORE. If you wish to ignore only particular errors, then you would basically implement expectError() as a callback. I didn't implement expectError directly in ErrorStack because a very small minority of projects actually need it, and it's only about 12 lines of code.