Hi!

I am working on a project for exchanging tidal water level information, and
we are exchanging information using XML over HTTP, and decided to try PHP
for the job. PHP has been a good choice so far, and the project is nearly
finished. But there is one problem remaining that could force us to drop PHP
entirely if we do not find a good solution. And that is error handling.

The standard we are using demands that all errors must be reported using a
predefined XML format. The problem is that many of the errors generatet by
PHP are fatal errors, so we are unable to trap them. It could have been
barely acceptable to use the error_prepend_string and error_append_string
from php.ini to encapsulate the error message, but the problem is that the
error message contains tags for linebreak and bold (<br> and <b>), which
makes it an invalid xml message, and also invalid acording to the standard
we are using.

And I see no reason why we should not be allowed to handle most of the fatal
errors we get on our own. Especially annoying is the xslt_process() function
that returns something like "<br><b>Fatal error</b>:  XML parser error 7:
mismatched tag in <b>/var/www/[...]". As far as I can see, this error should
not be fatal. In another programming language I would expect this type of
function to simply return false if there was an error of this kind. In my
opinion, untrapable errors should be reserved for the case where PHP really
had messed up its own internals.

So I should be really grateful if someone could help us out of this one!


Regards,


Svein Roar Nilsen
Norwegian Hydrographic Services




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to