ErrObject

The ErrObject module provides methods and properties to identify and handle runtime errors using the Err object.

You can use them at any place in your code.

The ErrObject contains information about runtime errors and accepts the Raise and Clear methods for generating and clearing runtime errors.

Err.Clear

Clears all property settings of the Err object.

Err.Description

Sets or returns the string expression containing a descriptive string associated with an object.

Err.HelpContext

Sets or returns a context ID for a topic in a Help file.

Err.HelpFile

Sets or returns a fully qualified path to a Help file.

Err.LastDLLError

Sets or returns a system error code from a call to a DLL.

Err.Number

This is the default property that sets or returns a numeric value that represents an error.

An Automation object can use this property to return an SCODE.

When a runtime error occurs, the properties of the Err object contain information that uniquely identify the error and can be used to handle it.

Err.Raise

Generates a user-defined runtime error.

Err.Source

Sets or returns the name of the object that caused the error.