Tuesday, December 2, 2008

Exception / Error Handling In Javascript

< script language = "JavaScript" >
try
{
var I = 10;
var J = 0;
var K = I/J;
}
catch ( e )
{
alert("An exception occurred in the script. Error name: " + e.name
+ ". Error message: " + e.message);
}
< / script >

No comments: