[AccessD] Application Error logging

Dan Waters dwaters at usinternet.com
Tue Dec 30 11:56:22 CST 2008


Hi John,

I've been doing the same for a few years and it is invaluable.  However,
there is a flaw.  You can't get the call stack which sometimes you need!

Solution:  Go to www.everythingaccess.com.  Look up Simply VBA Global Error
Handler - this will record call stack info when an error occurs.  I haven't
used it yet but it's my next system-wide modification to make.

BOL!
Dan

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Tuesday, December 30, 2008 10:44 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Application Error logging

As everyone knows I use a framework to control my 
applications.  Part of that framework is an error logger.

MZTools has a very slick widget that can create a custom 
error logger as well as place a module name in the top of 
any module.  It can only do this one module / procedure at a 
time but it does work, and works well.

So I use MZTools to create an error handler that calls a 
custom error function which logs all errors into an error 
table.  The parameters stored are:

1) The error number and message
2) The module, function and line number within the function 
that caused the error.
3) The workstation name
4) The user ID from my Security system
5) The date / time of the error
6) An "extra info" field so I can pass my own error data
7) The FE version so I can log the version of the application

As you can see, once you retrofit an application to always 
call the error handler, this logging will tell you any error 
that occurs anywhere in your application.  It can also log 
errors silently (not pop up an error message) for processes 
that are just automation and should not use message boxes to 
display errors (which would hang the process).

I started doing this only a couple of years ago and it has 
proven immensely valuable to discovering errors that the 
users just click through and never report, errors in my 
automation code (data import / exports etc).

I am pretty much to the point where I see every error now.

If there is interest I will provide the code I use to do 
this logging.  If anyone else does this kind of logging, 
feel free to speak up and discuss what you do.

-- 
John W. Colby
www.ColbyConsulting.com
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list