Register  Login  
  September 8, 2010  
 
Account Login Minimize


Register
Forgot Password ?

Print  

DownloadsLegacy DownloadsGlobal Error Handler    
Global Error Handler Minimize

Error handling is a necessary evil of programming in ANY VB environment.  All well-developed applications will have error handling code in most if not all of the procedures.  The "evil" lies in the fact that VB does not add this error handling code for you.  It only create the procedure "stub" (Sub...End Sub) for you so that it is up to the developer to add the error handling.  

The Global Error Handler add-ins has two components.  The first component, like the Security Add-In described above, adds all the objects that are needed to enable error handling and is installed from the Tools/Add-Ins/Global Error Handler menu item.  This will add two(2) objects to your table:  A table (usysErrors) which is the where all the errors are logged.  (Yes - one of the features of thjs Add-In is that all errors get logged into this table which makes troubleshooting problems much easier.)  And a module (basGlobalErrorHandler) which is procedure called by your handlers in order to handle and log the errors.

The second component is a "builder" that is installed by the setup routine.  When you create a new procedure the builder will automatically add all of the error handling for it including the call to the Global Error Handler (which logs the error).  To execute the builder, right click in the procedure and choose "Build" from the context menu.  Now, instead of going straight to the Expression Builder, a selection box will appear.  Choose "Global Error Handler" from the list and click OK.  The error handling code will be automatically inserted into your procedure.

For more information on the Error Handling Add-Ins or error handling in general please click here or read the help file that is distributed with the wizards.

To view/download the tools you must be a registered user.  If you are registered user you will see a hyperlink to the downloads page below.  Otherwise, register on the site and come back to this page.

Print  


  Home | Blog | Articles | Downloads | Forums | Links | Recommended Reading  
  Copyright 2005 by accesswizards.com   Terms Of Use | Privacy Statement