|
September 13, 2002 Processing in the try, catch, and finally Blocks Tips: September 2002
Yehuda Shiran, Ph.D.
|
|
The try...catch...finally statement in JScript .NET lets you handle the errors that may occur in the try block. If an error occurs in the try block, program control is passed to the catch block. The value passed to the catch block as a parameter is the value of the error that occurred in the try block. If no error occurs, the catch block is not executed. For errors that you don't handle in the catch block, JScript .NET provides its normal error message to the user, as if there was no error handling. But remember, avoid showing system errors to the user, as they may give the impression of buggy and sloppy coding.
After all statements in the To learn more about exception handling, go to Column 118, JScript .NET, Part XII: Exception Handling.
People who read this tip also read these tips: Look for similar tips by subject: |