QuickStart: How it works

Overview

vbWatchdog installs a small callback hook into the VBE debugger.  From then on, when an error occurs, our hook function first parses the error and passes details about the error on to a procedure that you have declared in your code.

Whether you want to just log errors to a simple text file, implement your own professional error dialogs, or some other advanced feature like ignoring 'On Error Resume Next' statements for debugging purposes - all this is easily achievable.

Furthermore, one of the main features of vbWatchdog is that we provide you with full details of where the error occurred in your source code (source line number, procedure name, module name, etc) - even if your project is fully compiled (e.g. Access MDE/ACCDE formats formats).

Flow Diagram

Flow Diagram



(An example of the new customizable error dialog using the new features of ErrEx)

Features (exposed programmatically)

  • The name of the procedure that caused the error (see ErrEx.SourceProcedure)
  • The name of the module where the procedure that caused the error resides (see ErrEx.SourceModule)
  • The name of the VB project where the procedure that caused the error resides (see ErrEx.SourceProject)
  • The line number in the procedure that caused the error (with automatic line numbering)
  • The source code line that caused the error (based on automatic line numbering)
  • The complete call stack details so that you can determine how your procedure got called
  • Professional, re-usable HTML based error dialogs ready for your use. Or design your own Access form if you wish!
  • VariablesInspector class for enumerating through the local variables in the procedure of error (and procedures in the callstack). With this you can also read the live values of those variables and log everything to your log table or file.

It's important to understand that once your global error handler is enabled, every error that occurs in your code now passes through your custom global error handler routine.

In other words, even if you specify 'On Error Resume Next' in your local procedure code, your global error handler will still be called. From within your global error handling routine, you can then decide what states of local error handling you wish to listen to or ignore. For example, most developers choose to ignore errors that occur when 'On Error Resume Next' has been specified in your local procedure.

See the Sample.mdb for a real example of implementing your global error handler.