RE: [PHP] Fatal Errors and Error Handling
| From: | Boget, Chris | Date: | Tue, 24 Apr 2001 12:47:10 +0000 |
| Subject: | RE: [PHP] Fatal Errors and Error Handling | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50057@lists.php.net to get a copy of this message | ||
> > My problem is that not displaying anything in case of an error is a
> > completely unacceptable solution. I *MUST* return a valid
> > XML message in a predefined format. If not, I am violating the
> standard we are
> if (@foo_bar (42, 4711) == ERROR_CODE) {
> PrintXMLErrorMessage ();
I do not believe the above will work. When using the "@" symbol
in front of an expression, it makes it so that the error code that is
returned is "0". While writing my error handler class, in the
function that processes whatever error is triggered, I check to see
if the error code is "0" and if it is, I do nothing because there was
an "@" symbol prepended to the expression.
You can read more about this in the error handling section of the
documentation.
Chris