On Jan 14, 1:56 pm, "C. (http://symcbean.blogspot.com/)"
<colin.mckin...@gmail.comwrote:
Quote:
On 14 Jan, 11:08, Bruno Rafael Moreira de Barros
>
<brunormbar...@gmail.comwrote:
Quote:
I want the trigger_error to say the error came from application.php
and the line where it came from. I have a custom error handler, so if
some change on the error handler (or test1(), for that matter) is
needed, I will gladly do it.
>
These *are* the parameters to the customer error handler.
>
fromhttp://uk.php.net/manual/en/function.set-error-handler.php
>
The third parameter is optional, errfile , which contains the
filename that the error was raised in, as a string.
The fourth parameter is optional, errline , which contains the line
number the error was raised at, as an integer.
>
See also:
http://uk.php.net/debug_backtrace
>
C.
Yes, but the problem is, the error line and file equal to the ones
that lead you to the declaration of the function...
So if you have:
test1(); // trigger the error
test1(); // trigger the error
test1(); // trigger the error
test1(); // trigger the error
test1(); // trigger the error
test1(); // trigger the error
test1(); // trigger the error
And you check the error log, all the errors will have come from the
same place, from inside test1(). But I tested try...catch and it
worked, and it even solved further problems I had.