Re: [PHP] __LINE__,__FILE__ + custom error handlers

2003-01-26 Thread Jason k Larson
from: http://www.php.net/manual/en/function.set-error-handler.php

string set_error_handler ( callback error_handler)

The user function needs to accept 2 parameters: the error code, and a
string describing the error. From PHP 4.0.2, an additional 3 optional
parameters are supplied: the filename in which the error occurred, the
line number in which the error occurred, and the context in which the
error occurred (an array that points to the active symbol table at the
point the error occurred).

example:
function myErrorHandler ($errno, $errstr, $errfile, $errline,
$errcontext) {...}

HTH,
Jason k Larson


electroteque wrote:

hi guys i am trying to create callback error functions handlers , i was
wondering if there was a way to get the file and line caught in a error
function say with a database abstraction query without having to explicitly
put the line and number in the query function , at the moment if i put line
and file inside the error handler it will only display where the error was
caught inside the handler itself :|





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] __LINE__,__FILE__ + custom error handlers

2003-01-26 Thread electroteque
hi guys i am trying to create callback error functions handlers , i was
wondering if there was a way to get the file and line caught in a error
function say with a database abstraction query without having to explicitly
put the line and number in the query function , at the moment if i put line
and file inside the error handler it will only display where the error was
caught inside the handler itself :|



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php