|
Posted by al3x4nder on 10/22/57 11:45
Tony Marston wrote:
> I solved this problem years ago:
>
> 1) Have a standard error handler which can be invoked using trigger_error();
> I call mine 'errorHandler'.
>
> 2) Create an alternative error handler for XML/XSL processing in PHP 5. I
> call mine 'XML_errorHandler'
>
> function XML_errorHandler ($errno, $errstr, $errfile, $errline,
> $errcontext)
> // deal with errors from XML or XSL functions.
> {
> // pass these details to the standard error handler
> errorHandler (E_USER_ERROR, $errstr, $errfile, $errline,
> $errcontext);
> } // XML_errorHandler
>
> 3) Just before performing and XML/XSL processing switch to the alternative
> error handler:
>
> set_error_handler('XML_errorHandler');
>
> 4) Don't forget to switch back again afterwards:
>
> set_error_handler('errorHandler');
>
> All this code can be downloaded from my website in my sample application at
> http://www.tonymarston.net/php-mysql/sample-application.html
>
> --
> Tony Marston
> http://www.tonymarston.net
> http://www.radicore.org
thank you very match!
it`s cool way!
I`m tested it and find it very nice!
Navigation:
[Reply to this message]
|