![]() |
The throw, try and catch statements![]() ![]() ![]() ![]() ![]()
An exception is an abnormal condition that arises in a code sequence at run time. In
other words an exception is a run time error. Your script generates an exception at
runtime so that it may be handled. The block of codes which resolves the exception
is known as an exception handler. Exceptions are handled by the try and catch
statements. The syntax for try catch statements are:
try( statements where exceptions may be thrown catch (exceptionvariable){ statements handling the exception The try statement contains the statements where exceptions may arise during the run time. When an exception is thrown during the execution of the statements contained within the try block the exception variable is assigned an error object which identifies the exception and the control passes to the catch block.
|
|
Domain NamesJAVASCRIPT Types of Variables Arrays Data Type Conversion Arithmetic Operators Logical and Comparison Operators Assignment Operators Ternary Operators Operator Precedence Assignment Statements If StatementsSwitch Statement Function Call Statement Try, Catch and Throw Statements The For Loop Java While Loop The Do While Loop Break and Continue Statements
String Methods Array Methods Objects, Methods and Properties The Boolean Object The Date Object The Global Object The Math Object
The Number Object Color Constants Hierarchy of Browser Objects Window Object Document Object History Object Navigator Object Buttons Check Box Radio Buttons Text FieldsWorking with Image Maps Creating Simple Animation Hidden Fields Working with Style Sheets An Example of HTML Graphics Replacement The <SPAN> Tag Positioning of HTML Content The <LAYER> TagWeb DesignWeb HostingE Commerce |
| Home | Web Hosting | Web Design | Sitemap |
| Copyright (C) 2007. Web Domain design hosting. All rights reserved. |