jactionscripters.com

Home > On Error > Vbscript On Error Resume

Vbscript On Error Resume

Contents

I completely understand the whole thing now! The caller sees the error, but the caller is in ‘resume next' mode, so it resumes. Syntax On Error resume next - Enable error handling On Error goto 0 - Disable error handling Error properties: err.Number (default) err.Source err.Description Examples In the examples below - replace the Table of Contents About This Book Introduction of VBScript - Visual Basic Scripting Edition Variant Data Type, Subtypes, and Literals Arithmetic Operations Numeric Comparison Operations and Logical Operations String Operations - More about the author

You can not catch those errors, because it depends on your business requirement what type of logic you want to put in your program. This is done by inserting a statement like the following at the start of a procedure:On Error Resume NextThis tells the VBScript engine that, should an error occur, you want it Herong Yang VBScript Tutorials - Herong's Tutorial Examples ∟Error Handling Flag and the "Err" Object ∟"On Error Resume Next" - Turning on Error Handling This section provides a tutorial example on I have modified the VBScript example used in the previous section to try to check the "Err" object by myself with the error handling flag turned on: