Description
Trace catchable errorsExtract from PHP manual. If the function returns FALSE then the normal error handler continues.
It doesn't tell us what the "normal error handler" is though.
If we return true then we can log some of the errors and processing will continue. But we can't do this for E_ERROR – since it's a Fatal error which we don't get to see.
If we return false then the standard PHP handler will most likely terminate the process for anything more serious than a Warning.
Usage
$bool = bw_trace_error_handler( $errno, $errstr, $errfile, $errline, $errcontext );Parameters
- $errno
- ( mixed ) required –
- $errstr
- ( mixed ) required –
- $errfile
- ( mixed ) optional –
- $errline
- ( mixed ) optional –
- $errcontext
- ( mixed ) optional –
Returns
bool Always false for the time being. We want the developer to be aware of the message.Source
File name: oik-bwtrace/includes/bwtrace-actions.phpLines:
1 to 15 of 15
function bw_trace_error_handler( $errno, $errstr, $errfile=null, $errline=null, $errcontext=null ) { $err_string = bw_trace_errno( $errno ); $err_string .= ": "; $err_string .= $errstr; $err = array( $errno, $err_string, $errfile, $errline ); bw_trace2( $err, "err", false, BW_TRACE_ERROR ); bw_trace2( $errcontext, "errcontext", false, BW_TRACE_VERBOSE ); //bw_trace( "errno", __FUNCTION__, __LINE__, __FILE__, $errno); //bw_trace( "errstr", __FUNCTION__, __LINE__, __FILE__, $errstr ); //bw_trace( "errfile", __FUNCTION__, __LINE__, __FILE__, $errfile ); //bw_trace( "errline", __FUNCTION__, __LINE__, __FILE__, $errline ); //echo "<!-- bw_trace_error_handler $errno $errstr, $errfile,$errline -->" . PHP_EOL; bw_backtrace(); return( false ); }View on GitHub View on Trac
Called by
Invoked by
Calls
1 to 3 of 3
