Replies

  •  

    Software testing solutions uses Java script on large scale these days. It provides several ways to handle errors and 'onError" event is one of them.

    When there is an script error in the page, then onError event is fired.

    The first feature to check error handling in java script is "onError" event handler. Event of error is fired on object's window when exception occurs on the page.
    The "onError" event handler shares following information to discover the error's nature
    a) Error Message: It shows the same message that is shown on browser for the error
    b) URL: Detail of file where error has occurred
    c) Line Number: The exact number of line that triggered the error

    onerror=handleErr;
    var warningtxt="";
    function handleErr(msg,url,l)
    {
    warningtxt="There was an error on this page.\n\n";
    warningtxt+="Error: " + msg + "\n";
    warningtxt+="URL: " + url + "\n";
    warningtxt+="Line: " + l + "\n\n";
    warningtxt+="Click OK to continue.\n\n";
    alert(warningtxt);
    return true;
    }
    function message()
    {
    addalert("hello user!");
    }

    The Best Software Testing Services Company - QASource
    Partner with the leading software testing company - QASource, and accomplish all your software testing services goals within strict deadlines and bud…
This reply was deleted.
    results->result as $result) { ?>
  1. jobtitle;?>
    company;?>(formattedRelativeTime;?>)city;?>, state;?>
    Welcome to Mobile QA Zone, a Next Generation Software Testing Community.Invite your friends to join this community.Write to us to become a featured member.