I have just been poring through C# books and no one seems to address this
well. Sure, otherwise great books like Jesse Liberty's "Progarmming C#" talk
about Exceptions but all the examples are too trivial. The examples just
shoot out an "I am here" kind of thing in the catch handler. Actually some
C# books don't even discuss it!! I need something more.

Lets suppose I am/have creating a C# library of classes in a namespace. I
want to put in full exception handling. I have some circumstances where I am
creating files and reading them with System.IO classes, I am doing a lot of
things with System.Xml. The thing is that I want to define and implement a
sound exception processing strategy. Obviously, I don't really want to
handle exceptions in a library by putting up System.Console.WriteLine("Can't
open file"). I want to throw them up to the caller, but what? Suppose I
catch an ArgumentNullException on a FileStream constructiuon. Does it make
sense to define my custom exceptions and throw those up? Are there any good
C# resources that show real exception processing/good pratices?



---------------------
Sam Gentile
.NET Consultant
Co-author: Wrox Visual C++ .NET: A primer for C++ developers
BLOG: http://radio.weblogs.com/0105852/
http://www.project-inspiration.com/sgentile/DotNet.htm
http://www.project-inspiration.com/sgentile/
---------------------------




_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to