[AccessD] No MsgBox allowed

Bryan Carbonnell carbonnb at sympatico.ca
Mon Sep 27 20:25:22 CDT 2004


On 27 Sep 2004 at 14:46, Colby, John wrote:

> importing data into the database. I want the piece that fails to
> error. log the error, email a notification of error, and exit so that
> the next process can attempt to run.  The next process may well run
> just fine.

> box displaying a message box for any unhandled errors.  Now I need all
> errors logged to disk, and the error log mailed to a list of email
> addresses when errors are encountered.

John,

Have a look at the error logging module in the BEU. We needed a way 
to send back any errors in the upgrade so that not only could the 
developer upgrade the BE remotely, they could also debug it remotely 
too.

> Thinking about this immediately raises a slew of questions.  I use a
> framework that sets up a host of functionality.  What happens when the
> failure is so early in the process that it can't even do logging or
> send an email?  How do I know how early that is?  My framework has to
> be rewritten to log errors and email them as well (where possible),
> since obviously if my framework errors we don't want that hanging the
> app.  OTOH, some errors can be ignored, others should stop the app. 
> If I have classes in the framework used by the app (and obviously I
> do) how do I get errors in the framework code to log in the app error
> log?  IOW, the framework has a wrapper class to copy files, create
> directories etc.  If that code fails, it can log an error, but it will
> log to the framework log, not the app log.  

> Aside from the obvious "Access is not the optimum environment to write
> such an app", has anyone done stuff like this (in Access) and do you
> have any thoughts on the issues above or any others I haven't raised? 
> Thinking about this concept gives a whole new appreciation for major
> apps such as Windows and Access where they should always do something
> intelligent even in the face of problems not even existing at the time
> the program was written.

In the BEU, one of the very first, if not the absolute first things 
the BEU does is initialise the ErrorLogging class.

That way when ANY error happens, it can be logged. I wrote it to 
solve a problem that I had with the BEU, how to detail the errors I 
found, so that Reuben and Andy could fix 'em :), and it was such a 
logical step to include it in the BEU as a feature.

I have also ripped it out of the BEU to include in my most recent 
project, so that I could handle issues that arise whitout having to 
run all over the place to figure it out

Have a look at it, and hopefully you can integrate something like it 
into your framework.

-- 
Bryan Carbonnell - carbonnb at sympatico.ca
It was difficult to code. So it damn well better be difficult to use.





More information about the AccessD mailing list