Re: Change and restore ErrorHandling (QF Rule using HTTP_Client)
| From: | Greg Beaver | Date: | Thu, 21 Oct 2004 19:01:48 +0000 |
| Subject: | Re: Change and restore ErrorHandling (QF Rule using HTTP_Client) | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15029@lists.php.net to get a copy of this message | ||
Thomas Schulz wrote:
Hi, normally I use: PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'handle_pear_error'); for setting an error handler resposible for all PEAR Packages. Within a QF-Rule validating URL's, I use HTTP_Client to perform an HEAD- Request. This raise an Error if the $uri couldn't connected and therefore if have to change the error handling to PEAR_ERROR_RETURN to catch this. Unfortunally PEAR::setErrorHandling() don't return the old state like some PHP functions usualy do (error_reporting, setlocale,...). Is there a solution to prevent my validate method from knowing the old state?use pushErrorHandling()/popErrorHandling() Greg