Search here for all the info you want in this Blog

Using the On error Statements


 Usually by default WSH displays error for script. Checking errors at runtime switch is On every time by using on error resume next switch is off ,if any error that occurs will essentially be ignored. Means it is globally supresses errors  for your entire script including procedures, functions, classes. But we can propose the following two rules.


 Unless you have a very good reason, never suppress all errors by simply placing the On Error Resume next statement at the top of your script.


 On error  Resume Next statement to temporarily disable error reporting, make sure you use a corresponding On Error GoTo 0 statement to enable it again.

(If you do not follow the above statement then, without realizing it, suppress error later in your script.

No comments:

Post a Comment