Once you have decided how to log exceptions, you have to code a
centralized routine to be called from wherever an exception is catched.
Needless to say that this routine must be rock-solid...in my last project,
this routine received 2 parameters to indicate how to log it: to the event
log, by-email, or both. If you have requested a way, and it fails (what
should not happen, of course), you can still use the other way to notify
that the exception notifier routine has failed, to avoid an exception
being silenced.
Then, you have to code your application and do a lot of testing since you
don´t know what exceptions can occur (I think that Java methods inform the
developer what exceptions can throw, but not in .NET). When parsing, you
can expect the IndexOutOfRangeException when strings are shorter than
expected, but only testing can provide you all exceptions that can happen.
--
Carlos J. Quintero
MZ-Tools 4.0: Productivity add-ins for Visual Studio .NET
You can code, design and document much faster.
http://www.mztools.com