Wrox Home  
Search P2P Archive for: Go

  Return to Index  

ado_dotnet thread: exception throwing and logging


Message #1 by "greg" <grobinson@d...> on Thu, 16 May 2002 14:26:23
Peers, we have a custom logging component that logs exception, messages, 
etc to custom event logs.  In our code, we have try/catch blocks that 
catch any exceptions, then we log them if necessary, then we throw them if 
necessary.  3-steps.  I like this approach.  My client would like to take 
the logging adn throwing steps and make them one step.  Meaning, one call 
to a component that logs and throws. 

Opinions on both approaches? 
Message #2 by "Tom Degen" <TDEGEN@o...> on Fri, 17 May 2002 08:55:26 -0500
Speaking from the standpoint of an IT professional, I think the choice
is based solely on who your client is.  If your client is another IT
professional who can manage the code or effect future changes, then I
think you should do as they ask and hand it off to them.  If your client
knows little or nothing about programming then I think you need to step
in and explain to them that there is a reason why you have the logging
an exceptions more modularized.  In my experience I find that some
managers/clients (who are not computer savvy) feel that they need to
have some kind of input.  They will take something rather benign and try
to make generic changes to it just so they can have some input into the
project structure. Not everyone is like this, I'm sure, but I have
encountered 1 or 2 clients who take just to hear themselves speak.

gosh... that paragraph sounds so cynical. 

At any rate, I think you need to look ahead and whoever is going to
control the code in the future, make it easier for them to add to or
change options.  You can be flexible, but stand by your convictions,
nothing will ever get done if you try and accommodate every whim that a
client has.


This of course, assuming that the program will work exactly the same way
whether it is three steps or one step.


----------------------------------------------------------------------

Subject: exception throwing and logging
From: "greg" <grobinson@d...>
Date: Thu, 16 May 2002 14:26:23
X-Message-Number: 1

Peers, we have a custom logging component that logs exception, messages,

etc to custom event logs.  In our code, we have try/catch blocks that
catch any exceptions, then we log them if necessary, then we throw them
if
necessary.  3-steps.  I like this approach.  My client would like to
take
the logging adn throwing steps and make them one step.  Meaning, one
call
to a component that logs and throws.

Opinions on both approaches?
----------------------------------------------------------------------

  Return to Index