Best error handling
| From: | Davi Ramos | Date: | Sat, 28 Feb 2009 00:04:53 +0000 |
| Subject: | Best error handling | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-288954@lists.php.net to get a copy of this message | ||
Hi. I have a kind of webserver that certain applications communicate with.
The problem is that the script (named peer.php) must output data as xml.
Thats ok (thanks to XMLWriter). The problem is that when some error occurs
(those note catchable by set_error_handler) I have no control on data being
outputed.
I would like to output xml even on fatal errors (in that case, telling that
something gone wrong). I tried using register_shutdown_function but it is
crashing (as the nature of fatal errors that make the envirionment
unstable).
Any idea?
Thanks!
--
Davi R. Tavares