[AccessD] vbWatchdog error handler

Jim Dettman jimdettman at verizon.net
Tue May 30 07:21:59 CDT 2023


Stuart,

 Not often I would disagree with you, but on this, I definitely do.

 There are so many reasons to include error handling in production.   Odd
data, environment issues, bugs in Access, etc can all lead to errors despite
your best efforts.   Yes, with good development practices, you can avoid 99%
of the errors, but no one can anticipate everything, develop, and test for
that.   You'd never finish an app, and there will always be something you
don't think of.

 And on this:

<<In the rare event that a user finds a new way to break the application,
>>

 Plunk a new user down in the chair and they are exactly the ones that will
find a way to break a app.   Because they have no preconceived notions on
how an app should operate, they will try all kinds of things.   Odd
keystrokes, switching windows, not waiting for a process to finish, etc.

<< they will generally let you know and you can implement a fix.>>

  Big "HA" to that!   My software emails me when it encounters are error, so
I know when things happen.  Users often click through errors and if it still
seems to do the job, they will never bother to report the error, just keep
clicking through. I've had that proven time and time again.

<< I can see it being useful during pre-release testing, but not in
production.>>

 vbWatchDog is slick in that it hooks VBA directly, so you don't need to
write error handling everywhere.    I don't use it myself, but only because
I already had a fairly full featured error handler when it first came out,
and templates to easily insert code into a procedure.   But even so, I have
considered using it.

 One reason is you don't need to number lines to use VBA.erl.   vbWatchDog
picks up the line directly out of VBA.   So that would be a time saver, as
would not adding the extra code for an error handler in every procedure
(time wise and size of app would be smaller).

Jim. 



-----Original Message-----
From: AccessD On Behalf Of Stuart McLachlan
Sent: Tuesday, May 30, 2023 3:04 AM
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Subject: Re: [AccessD] vbWatchdog error handler

Me too. :)

Error handling should be pro-active.  Untrapped errors that require this
sort of framework are 
an indication of poor design and testing.
It's just a PITA that the VBA developers have never bothered to implement
Try...Catch and 
you have to resort to IFs and/or the clunky On Error Goto.

In the rare event that a user finds a new way to break the application,
they will generally let 
you know and you can implement a fix.

I can see it being useful during pre-release testing, but not in production.


On 30 May 2023 at 5:28, Gustav Brock via AccessD wrote:

> Hi Dan and John
> 
> I must say, I´ve never understood the need for extensive error
> handling. We test our applications very carefully, thus errors are
> extremely rare and certainly not happening on a daily basis.
> 
> /gustav
> 
> Fra: Daniel Waters<mailto:df.waters at outlook.com>
> Sendt: 30. maj 2023 02:48
> Til: Access Developers discussion and problem
> solving<mailto:accessd at databaseadvisors.com> Emne: Re: [AccessD]
> vbWatchdog error handler
> 
> Hi John,
> 
> I used this up until about 5 years ago.  It's an excellent addition,
> and much more than worth the money.  Set up a table to store the error
> data, create a report that shows that data, and set up a daily email
> so you'll know of any errors that occurred yesterday at each of your
> customers.  Or you can set up an immediate email for any error or if a
> certain type of error occurs.
> 



-- 
AccessD mailing list
AccessD at databaseadvisors.com
https://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list