Hi all,
This time I don't have any problem but just for curiosity I want to know how many exception are there in JavaScript.
For example I am using following code:
<script type="text/javascript">
var x;
try{
x = 1 / 0;
alert(x); // output: Infinity. FYI: JavaScript has Infinity property and it's value is 1.7976931348623157E+10308
alert(funCreate());
}
catch(obj)
{
alert(obj.fileName);
alert(obj.lineNumber);
alert(obj.message); // output: funCreate is not defined
alert(obj.name); // output: ReferenceError
alert(obj.stack);
};
</script>
here, ReferenceError is like an exception type. So if it is treated as an exception type, then can we handle the exception by type? like we all do in other programming language. see link.
Thanks...