Because explicit naming of possibly thrown exceptions - leads also to unmaintainable 
code.

Do you really know what exceptions your component MIGHT throw in the next version? I 
kknow some java projects where suddently all exceptions were inherited from 
RuntimeException, which did not require this explicit mentioning.

So - the resolution is not to be lazy and read the documentation saying which 
exceptions might be thrown,

PLUS - putting in and handling "unexpected exceptions".


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)



-----Original Message-----
From: Miguel Ángel Chacón [mailto:[EMAIL PROTECTED]] 
Sent: Mittwoch, 24. April 2002 13:19
To: [EMAIL PROTECTED]
Subject: [DOTNET] Exception architecture of .NET


Hi, taking in account that .Net exceptions are very similar to java exceptions, where 
is the 'throws', that makes a developer to 'mark' his functions that throws a 
particular type of exception. This is very useful in Java, because the compiler don´t 
compile if don´t write code to catch all the possible exceptions a function can throw. 
Why this is not in the .NET Framework?

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe 
to other DevelopMentor lists at http://discuss.develop.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