2009/9/24 Tom Worster <[email protected]>:
> but i'd like proceed with default error handling in the branch with the
> question marks. how can i do that?
An error handler that passes through to the previous error handler:
<?php
error_reporting(E_ALL);
function my_error_handler($errno, $errstr, $errfile, $errline) {
restore_error_handler();
trigger_error($errstr, $errno);
}
set_error_handler('my_error_handler', E_ALL);
trigger_error('TEST', E_USER_ERROR);
You'll lose the file and line, though, because you're actually raising
another error with the same message at a new point in the code.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php