Array index to large exception : Exception « Development « JavaScript Tutorial






<html>
<head>
<title>Try Catch Example</title>
<script type="text/javascript">
try {
   var arrErrors = new Array(10000000000000000000000);  //causes error
   arrErrors.push(exception);
} catch (oException) {
    alert("An exception occurred.");
} finally {
    alert("All done.");
}

</script>
</head>
<body>
</body>
</html>








4.7.Exception
4.7.1.Syntactic exception
4.7.2.Array index to large exception
4.7.3.Get Exception message
4.7.4.Exception handler will bypass the statements
4.7.5.Get Exception name
4.7.6.Check the exception name and output exception message
4.7.7.Check Exception type with instanceof operator
4.7.8.Throw exception out of a function