jwcolby
jwcolby at colbyconsulting.com
Tue Dec 30 10:44:21 CST 2008
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