[AccessD] Error Code Generator

DWUTKA at marlow.com DWUTKA at marlow.com
Mon Sep 25 14:38:35 CDT 2006


Okay, I think we are talking two different things.  I agree that any
function may require it's own unique handler, to handle usual cases.  But
for the generic tasks, such as displaying or recording an error, it only
makes sense to have a global/centralized process.

Drew

-----Original Message-----
From: JWColby [mailto:jwcolby at colbyconsulting.com] 
Sent: Friday, September 22, 2006 3:26 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Error Code Generator

Art,

A "non-local" way simply cannot handle all the parts required.  A local
error handler knows that procedureA is about opening a recordset while
procedureB is about opening a form, while ProcedureC is about calculating
the cubic volume of a lake.  Very different problems, very different errors
that will occur.  At the least the local error handler will have a case
statement that has error values added to the case as the errors are
discovered, but may indeed call a global error logger / emailer.

John W. Colby
Colby Consulting
www.ColbyConsulting.com

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of artful at rogers.com
Sent: Friday, September 22, 2006 4:12 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Error Code Generator

That was precisely my point. It seems the logical way to do it, but all the
generators and the built-in stuff likes the local version. I don't get why
that would be better. Given modern chip speed, it's obviously not about
jumps. Maybe all the code does compress nicely but the local way seems so
clumsy to me.

----- Original Message ----
From: DWUTKA at marlow.com
To: accessd at databaseadvisors.com
Sent: Friday, September 22, 2006 1:51:07 PM
Subject: Re: [AccessD] Error Code Generator

I do it the way you just mentioned.  I have a global errorhandler, that
receives the information I want to 'monitor' from each procedure.  It saves
time and space, and with a central point for errorhandling, I can force
things pretty easily.  (Record the errors in a db, shut the system down,
etc.)

Drew

-----Original Message-----
From: artful at rogers.com [mailto:artful at rogers.com]
Sent: Friday, September 22, 2006 12:33 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Error Code Generator

I didn't write it, but it raises a question that I have wondered about for a
while. Why is it better to embed the error routine in the particular proc or
func than to write one global error handler and pass it the text and perhaps
the proc/func name, so there's only one error handler in the whole app? I
never did understand this. Can anyone provide some insight?

Arthur

----- Original Message ----
From: Martin Reid <mwp.reid at qub.ac.uk>
To: Access Developers discussion and problem solving
<accessd at databaseadvisors.com>
Sent: Friday, September 22, 2006 1:19:04 PM
Subject: [AccessD] Error Code Generator

I believe someone on the list created an error generator. I believe it might
be JC? Anyway I have been using it a lot for code examples and just to be
politically correct want the owner to know. Example below
 
 
Function CopytoWss()
On Error GoTo Err_CopytoWss
    DoCmd.SelectObject acTable, "Contacts"
    DoCmd.RunCommand acCmdExportSharePointList
Exit_CopytoWss:
Exit Function
Err_CopytoWss:
        MsgBox Err.Description, , "Error in Function CopytoWss"
        Resume Exit_CopytoWss
    Resume 0    '.FOR TROUBLESHOOTING
End Function

 
Martin
 




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




--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.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