ref: ErrEx

Class Description

.


Sub Catch(ByVal ErrorNumber1 As Long, _
              Optional ByVal ErrorNumber2 As Long, _
              Optional ByVal ErrorNumber3 As Long, _
              Optional ByVal ErrorNumber4 As Long)

[Enterprise Edition] Allows local error handling of specific error numbers.  See Try-Catch documentation.

Sub Finally(Optional ByVal Ignore1 As Long = &Hffffffff, _
              Optional ByVal Ignore2 As Long = &Hffffffff, _
              Optional ByVal Ignore3 As Long = &Hffffffff, _
              Optional ByVal Ignore4 As Long = &Hffffffff)

[Enterprise Edition] Allows a cleanup, Finally block to be used in the Try-Catch paradigm.

Sub CatchAll(Optional ByVal Ignore1 As Long = &Hfffffffe, _
              Optional ByVal Ignore2 As Long = &Hfffffffe, _
              Optional ByVal Ignore3 As Long = &Hfffffffe, _
              Optional ByVal Ignore4 As Long = &Hfffffffe)

[Enterprise Edition] Allows a catch-all block to be used in the Try-Catch paradigm.

Sub DoFinally()

[Enterprise Edition] Moves program flow to the Finally block.  Use instead of Exit Sub/Function/Property.

Property Get IsEnabled() As Boolean

Returns true if vbWatchdog is active.

Property Get SourceProject() As String

Returns the name of the current VBA project, as a string.  Equivalent to ErrEx.Callstack.ProjectName.

Property Get SourceModule() As String

Returns the name of the current VBA module, as a string.  Equivalent to ErrEx.Callstack.ModuleName.

Property Get SourceProcedure() As String

Returns the name of the current VBA procedure (top of the callstack), as a string.  Equivalent to ErrEx.Callstack.ProcedureName.

Property Get SourceProcedureIndex() As Long

Returns the procedure ordinal of the current procedure at the top of the callstack, can be used to match up with the VBE line numberer addin.

Property Get SourceLineNumber() As Long

Returns the line number of the currently executing sourceline at the top of the callstack relating to the error being handled.  Equivalent to ErrEx.Callstack.LineNumber.

Property Get SourceLineCode() As String

Returns the currently executing line of VB code at the top of the callstack relating to the error being handled.  Equivalent to ErrEx.Callstack.LineCode.  Only available if the source code is available.

Property Get Callstack() As ErrExCallstack

Returns an object representing the callstack of the error being handled.

Property Get VariablesInspector() As ErrExVariables

[Enterprise Edition] Returns an object representing the variables collection of the procedure where an error occured.

Property Get DialogOptions() As ErrExDialogOptions

Returns an object for customizing the error dialog.

Property Get VariablesDialogOptions() As ErrExDialogOptions

Returns an object for customizing the variables dialog.

Property Get State() As OnErrorStatus

Property Let State(ByVal Value As OnErrorStatus)

Determines/changes the state of the VBE error handler.

Property Get StateAsStr() As String

Returns a string representation of the enumeration returned by the State property.

Property Get Description() As String

Property Let Description(ByVal Value As String)

Returns/sets the description of the error being handled by your global error handler.

Property Get HelpFile() As String

Property Let HelpFile(ByVal Value As String)

Returns/sets the helpfile of the error being handled by your global error handler.

Property Get Source() As String

Property Let Source(ByVal Value As String)

Returns/sets the source of the error being handled by your global error handler.

Property Get HelpContext() As Long

Property Let HelpContext(ByVal Value As Long)

Returns/sets the helpcontext of the error being handled by your global error handler.

Property Get LastDLLError() As Long

Returns the LastDLLError property of the error being handled by your global error handler.

Property Get Number() As Long

Property Let Number(ByVal Value As Long)

Returns/sets the Number property of the error being handled by your global error handler.

Property Get VerifyOnErrorProcName() As Boolean

Property Let VerifyOnErrorProcName(ByVal Value As Boolean)

Determines whether or not Enable() checks the validity of the passed in procedure name.

Sub Enable(ByVal OnErrorProcName As String)

Enables vbWatchdog.  OnErrorProcName parameter is the name of your global error handler, as a string.  You can pass an empty string if you do not wish to define a global error handler.

Sub Disable()

Disables vbWatchdog.

Sub CallGlobalErrorHandler(Optional ByVal UserData As Variant)

Used in local error handling to re-pass an error on to your global error handler.

Function LiveCallstack() As ErrExCallstack

[Enterprise Edition] Returns an object representing the LIVE callstack.  Can be used anywhere in your application -- no global error handler required.

Property Get ProjectFilterList() As String

Property Let ProjectFilterList(ByVal Value As String)

Returns/sets a delimited list of VBA projects whose errors will not be passed on to your global error handler.  Ideal for ignoring handled errors generated by the Access-Wizard MDE/ACCDEs.

Sub ShowHelp()

Shows the help file associated with the error being handled.

Function ShowErrorDialog() As OnErrorStatus

Invokes the error dialog and returns the selected option (debug, end, etc).

Property Get UserData() As Variant

Property Let UserData(ByVal Value As Variant)

Returns/sets a custom value for use by your global error handler when using the ErrEx.CallGlobalErrorHandler feature.

Property Let Bookmark(Optional ByVal Ignore1 As Long = &H204fc3d9, _
              Optional ByVal Ignore2 As Long = &H7fbc29e2, _
              ByVal Value As Long)

{DEPRECATED} Identifies a line of code as a bookmark for conditional jumping from within your global error handler.

Function SetBookmarkAsOnErrorGoto(ByVal Marker As Long) As Boolean

{DEPRECATED} Used for conditional jumping from within your global error handler.

Property Get CurrentBookmark() As Variant

{DEPRECATED} Returns the Bookmark value of the latest bookmark where the currently executing code resides.  See Bookmarks documentation for further information.

Sub GoToBookmark(ByVal Marker As Long)

{DEPRECATED} Moves to the specified bookmark inside the current procedure.

Property Get IsDebugable() As Boolean

Determines whether or not the error being handled is debugable.

Property Get VBEVersion() As String

Returns the complete version number of the VB compiler, VBE6.dll or VBE7.dll.

Property Get Version() As String

Returns the complete version number of vbWatchdog.

Property Get VariablesInspectorEnabled() As Boolean

Property Let VariablesInspectorEnabled(ByVal Value As Boolean)

Returns/sets whether or not vbWatchdog allows reading of the variables values in procedures.

Property Get CustomVars(ByVal Name As String) As String

Property Let CustomVars(ByVal Name As String, _
              ByVal Value As String)

Returns/sets custom variables for use in your error dialog templates.  Use this from within you global error trap.

Class Description (v4 additions)

Property Get HostPath() As String

This property returns the full path to the host process executable. For example, "C:\Program Files (x86)\Microsoft Office 2016\MSACCESS.EXE"
Property Get HostVersion() As String

This property returns the full version number of the host process executable, as a String type. For example, "16.0.15225.20288"
Property Get ProcessUsername() As String

This property returns the username of the user that launched the host process.
Property Get ProcessID() As Long

This property returns the process ID of the executing process, as a Long type. This is the same number that is listed in Task Manager (PID).
Property Get ProcessThreadID() As Long

This property returns the process thread ID number, as a Long type.
Property Get ProcessUptime() As String

This property returns the length of time since the executing process was launched, as a String in format "D:HH:NN:SS". So for example, if the process has been running for 5 days, 14 hours, 3 minutes and 45 seconds, the value returned would be "5:14:03:45"
Property Get SystemUptime() As String

This property returns the length of time since the operating system was started, as a String in format "D:HH:NN:SS". So for example, if the system has been running for 35 days, 5 hours, 40 minutes and 2 seconds, the value returned would be "35:05:40:02"
Property Get SysInfoCPUID() As String

This property returns the CPUID of the processor installed in the system. For example, "AuthenticAMD : AMD Ryzen 9 5950X 16-Core Processor"
Property Get SysInfoOSVersion() As String

This property returns the version information string about the operating system. For example, "Windows 10 (Build 19043)"
Property Get SysInfoPhysicalRam() As Double

This property returns the amount of physical RAM installed in the system, in bytes.
Property Get SysInfoPhysicalRamUsed() As Double

This property returns the amount of physical RAM that is in-use in the system, in bytes.

Class Description (v5 additions)

Property Get SysInfoGDIHandlesCount() As Long

Reports the number of GDI handles in use by the process - useful for detecting graphics resource leaks
Property Get SysInfoUserHandlesCount() As Long

Reports the number of USER object handles (e.g. windows, menus, cursors) in use — helpful for spotting UI leaks
Property Get SysInfoIsARMProcessor() As Boolean

Indicates if the app is running on an ARM processor, allowing runtime adjustments where needed.