Re: static method callbacks for pear error
| From: | Alan Knowles | Date: | Tue, 16 Jul 2002 08:09:32 +0000 |
| Subject: | Re: static method callbacks for pear error | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-7738@lists.php.net to get a copy of this message | ||
ok, attached is a 'tested version'..
Alan Knowles wrote:
> just looking at pear error for handling application errors and
> displaying an error page. in the application i'm working on, the pages
> can generate errors, they return "error" to the page manager which
> then reroutes the error page class.
>
> since this error page object is not available at the time the error
> happens, I would prefer to call a static method of the error page, and
> store the error in a static variable.
>
> to do this involves doing something like this:
>
> PEAR::setErrorHandling(PEAR_ERROR_CALLBACK,
> array('pages_error','raiseError'));
> currently PEAR::Error handling doesnt handle static callbacks -
> attached is a patch to enable it..
>
> any thoughts
>
> regards
> alan
>
>
>