R
Russell Mangel
Jeffery Richter makes the following statement in two books, the first was
written in 2004, the latter in 2002.
"You should not define new exception classes derived from
ApplicationException; use Exception instead."
..NET Framework Standard Library Annotated Reference, Volume 1: Base Class
Library and Extended Numerics Library (2004)
http://www.aw-bc.com/catalog/academic/product/0,1144,0321154894-DS,00.html
Exception Management Application Block for .NET
http://www.amazon.com/exec/obidos/tg/detail/-/0735614229/103-5946254-8231854?v=glance
I own about 15 C# books, and most of them claim that you should always
inherit from ApplicationException. I am putting some finishing touches on a
class library that I have written in C#, the classes are very similar to the
classes found in System.IO namespace, my library handles very long directory
names and file names, the existing Directory and File classes in FCL can not
do this. I would like to make a good decision on implementation of Exception
Handling for my classes.
Additionally, I also noticed that the "Exception Management Block for .NET"
(April 2002), is inheriting from ApplicationException. I am hesitant to use
it because of Jeffery's comments. He seems to be a well trusted author.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/emab-rm.asp
What is the latest scoop on this? Should I follow Jeffery's advice, or
should I "anger the saints" and inherit from ApplicationException?
Thanks
Russell Mangel
Las Vegas, NV
PS
I wish not, to die of mis-print.
written in 2004, the latter in 2002.
"You should not define new exception classes derived from
ApplicationException; use Exception instead."
..NET Framework Standard Library Annotated Reference, Volume 1: Base Class
Library and Extended Numerics Library (2004)
http://www.aw-bc.com/catalog/academic/product/0,1144,0321154894-DS,00.html
Exception Management Application Block for .NET
http://www.amazon.com/exec/obidos/tg/detail/-/0735614229/103-5946254-8231854?v=glance
I own about 15 C# books, and most of them claim that you should always
inherit from ApplicationException. I am putting some finishing touches on a
class library that I have written in C#, the classes are very similar to the
classes found in System.IO namespace, my library handles very long directory
names and file names, the existing Directory and File classes in FCL can not
do this. I would like to make a good decision on implementation of Exception
Handling for my classes.
Additionally, I also noticed that the "Exception Management Block for .NET"
(April 2002), is inheriting from ApplicationException. I am hesitant to use
it because of Jeffery's comments. He seems to be a well trusted author.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnbda/html/emab-rm.asp
What is the latest scoop on this? Should I follow Jeffery's advice, or
should I "anger the saints" and inherit from ApplicationException?
Thanks
Russell Mangel
Las Vegas, NV
PS
I wish not, to die of mis-print.