For programming point of view it is necessary for developer to handle the error or exception that occur at run time due to an illegal operation during execution.
The example of exceptions or errors are
- Trying to reference an undefined variable.
- Calling a non existent method.
- Syntax error etc.
Try\Catch helps statement us to deal with exceptions gracefully. However it doesn't deal with Syntax error.
adddlert("Welcome to MCN !");
txt="Sorry there is an error related to addalert. \n\n";
txt+="Error type: " + err.errormessage + "\n\n";
txt+="Do you want to continue ! Press OK .\n\n";
<input type="button" value="error message" onclick="errormessage()" />
when we click on "errormessage" button, then
You may also want to read these related articles :
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here