Mega Code Archive

 
Categories / JavaScript Tutorial / Development
 

Get Exception name

< html> <head> <title>Try Catch Example</title> <script type="text/javascript"> try {     window.nonExistentFunction(); } catch (oException) {     alert("An exception occurred: " + oException.name); } finally {     alert("End of try…catch test."); } </script> </head> <body> </body> </html>