JScript .NET, Part XII: Exception Handling: A Final Word - Doc JavaScript | WebReference

JScript .NET, Part XII: Exception Handling: A Final Word - Doc JavaScript


JScript .NET, Part XII: Exception Handling

A Final Word

In this column, we introduced you to exception handling in JScript .NET. We first explained that exception handling is better than if..else statements which tend to clutter the code and make it hard to maintain and modify. We showed you how to use the try...catch...finally statement, how to throw exceptions, and how to catch them in an inner catch block, or in an outer catch block. We listed a few examples that illustrated the role of the system to catch exceptions that you don't handle. We described in detail the properties and constructor function of the Error object. You can throw both strings and Error objects.

In this column you have learned:



Produced by Yehuda Shiran and Tomer Shiran
All Rights Reserved. Legal Notices.
Created: September 9, 2002
Revised: September 9, 2002

URL: https://www.webreference.com/js/column118/7.html