
January 28th, 2004, 12:37 PM
|
|
Registered User
|
|
Join Date: Feb 2004
Posts: 13
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Article Discussion: Exception Handling in C#
The fundamental thing that exceptions allow you to do is to separate the essential functionality from the error handling. ReadSource has come close to the ideal version we're all looking for, thanks to exceptions. Ironically, exceptions allow us to get close to this ideal version of ReadSource but at the same time prevent us from quite reaching it. The problem is that if an exception occurs after acquiring the resource but before releasing it then the release will not take place. The solution to this lost release problem depends on the language you're using. C# allows you to create user-defined struct types that live on the stack but does not allow struct destructors.
Read the full article here: Exception Handling in C#
|