i have this hack that works up to a point...

function my_err_handler($errno, $errstr, $errfile, $errline) {
    if ( preg_match('/iconv/', $errstr) ) {
        throw new Exception('iconv error');
    } else {
        // ? how to invoke default error handler ?
    }
}
set_error_handler("my_err_handler", E_NOTICE);

try {
    $s = iconv($enc1, $enc2, $s);
} catch (Exception $e) {
    // deal with the failed conversion
}

but i'd like proceed with default error handling in the branch with the
question marks. how can i do that?



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

Reply via email to