**********************************************************************************
Why On Error Resume Next:
**********************************************************************************
To avoid the unexpected errors caused by the script
**********************************************************************************
What "On Error Resume Next" will do?
***********************************************************************************
These Statment will supress the error produced by the script and resumes the next step
***********************************************************************************
On Error Goto 0
***********************************************************************************
These will be helpful to disabled the Activated On error resume next statement
***********************************************************************************
Err Object :
***********************************************************************************
In VB Script every single statement will produce the Error number,if it is Zero stament is correct else statment is false
***********************************************************************************
To get the error number :
***********************************************************************************
msbox Err .number
***********************************************************************************
To get the error Description:
***********************************************************************************
msgbbox Err.Description
***********************************************************************************
To clear the error:
***********************************************************************************
Err.Clear
Note: When We get the error number through Err object, we should explicitly clear the error number,otherwise script will carries only one number
***********************************************************************************
To raise the error:
***********************************************************************************
Err.Raise
***********************************************************************************
Note : On Error Resume Next will handle the only Script error not application errors
***********************************************************************************
Why On Error Resume Next:
**********************************************************************************
To avoid the unexpected errors caused by the script
**********************************************************************************
What "On Error Resume Next" will do?
***********************************************************************************
These Statment will supress the error produced by the script and resumes the next step
***********************************************************************************
On Error Goto 0
***********************************************************************************
These will be helpful to disabled the Activated On error resume next statement
***********************************************************************************
Err Object :
***********************************************************************************
In VB Script every single statement will produce the Error number,if it is Zero stament is correct else statment is false
***********************************************************************************
To get the error number :
***********************************************************************************
msbox Err .number
***********************************************************************************
To get the error Description:
***********************************************************************************
msgbbox Err.Description
***********************************************************************************
To clear the error:
***********************************************************************************
Err.Clear
Note: When We get the error number through Err object, we should explicitly clear the error number,otherwise script will carries only one number
***********************************************************************************
To raise the error:
***********************************************************************************
Err.Raise
***********************************************************************************
Note : On Error Resume Next will handle the only Script error not application errors
***********************************************************************************
No comments:
Post a Comment