We have multiple vb projects.We want to put error handlers in all functions, and error handler should write to a file.Are there any tools available - we have looked at codesmart and vbwatch.
Here's a freeware program:
http://wareseeker.com/Software-Development/automatic-error-handling-pro-1.1.0.zip/238557
and here's some source code for doing it yourself:
http://www.nigelrivett.net/VB/VBAddErrorHandling.html
MZ-Tools, which is free and very easy to install, is often recommended:
Supported Microsoft Development Tools
- Visual Studio 2008 (except Express editions)
- Visual Studio 2005 (except Express editions)
- Visual Studio .NET 2003
- Visual Studio .NET 2002
- Visual Basic 6.0
- Visual Basic 5.0
- VBA Editor (Office 2000-2007 or others)
Supported Programming Languages
- Visual C#
- Visual Basic .NET
- Visual C++ (partial support, most features)
- Visual J#
- Visual Basic 6.0 and 5.0
- Visual Basic for Applications (VBA)
Make sure you test performance before putting it in all procedures. Our Error Handler solution (VBRig) noticeably impacted math calculation and screen redraws in our CAD/CAM application. It wasn't badly written but the addition of doing the logging hundreds of time added up.
We switched to use error handling in all event routines and selected other area. While not ideal from a design standpoint it brought performance back up to what it needed to be.