It is an “intrinsic object with global scope. Always with vb-script code no need to declare a variable to hold an Err object and no need to instantiate it using CreateObject or New. Exactly one Err obj in memory all time .
The Error object contains information about the last error that occurred. The object has two methods.
- Clear method . ( the last error is thrown away)
Err Object is additionally cleared by any of the following
On error resume next, On error goto 0,Exit sub, Exit function
2. Raise method. ( which you can use in your VBScript code to generate custom runtime errors. Some main properties to display the information of error are:
Description, Number, Source, HelpFile, HelpContext
No comments:
Post a Comment