Hi All,
        I tell my requierment first. Just in short I want to capture a
error of "Undefined Function .so and so..." .
        I set Error Handler to

        E_ALL & ~E_ERROR and I set my own Error Handler to capture errors
then I called a Non-Existent Function intentionally.

in this case its not at all capturing the error and silently executing
the program. 

Can anyone tell me what is the workaround this.
For clarification here is the code.

<?php

function ErrorHandler($Errcode, $Errmsg )
{
    print "ErrorCode: " . $Errcode  . "\n" ;
    print "ErrorMsg : " . $Errmsg   . "\n" ;

    return false ;
}


error_reporting(E_ALL & ~E_ERROR);

$prev_hand = set_error_handler("ErrorHandler");

// It's always executing if section instead of else.

if(!$prev_hand) {
    print "Unable to set error handler\n" ;
} else {
    print "Previous Handler" . $prev_hand ;
}


?>




<[EMAIL PROTECTED]>
-------------------------------------------------------------------
We must use time wisely and forever realize that the time is 
always ripe to do right."
            
                -- Nelson Mandela
-------------------------------------------------------------------


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

Reply via email to