> > > > > if (@foo_bar (42, 4711) == ERROR_CODE) {
> > > > > PrintXMLErrorMessage ();
> Well, we both are right. The snippet I suggested (top of this mail)
> *will* work, because the @ operator doesn't mess with the return
> value of the function.
That is correct. However, the "== ERROR_CODE" suggests that
an error code will be returned by foo_bar(). However, that code
will be suppressed by the "@" symbol and that is what I was commenting
on... the fact that the above example couldn't be used if you wanted
to print your own error messsage.
> A custom error handling function installed via set_error_handler()
> will *not* work because it won't get the error code.
Well, it will work and it will still be called. However, the error code
passed to it will be '0'.
> But I never suggested using set_error_handler() :)
But the issue at hand was the fact that the original poster
was using, and needed to use, set_error_handler to handle
their own errors.
Chris