Learn one new .NET trick every day
Быстрое пополнение счета телефона
Login
or
Join
Handling errors at the method level
If potential errors are recoverable in the routine
Use a combination of try…Catch blocks as a retry mechanism for error handling.
If useful information can be added to the exception
Create and throw a new exception with the added information.
If cleanup is required
Perform it in the finally block.
If potential errors are not recoverable in the routine
Recovery should be handled by the calling routine and its error-handling structure.
submitted by Lohith Bandrehalli
10/28/2007
Comment
Bookmark It
Stumble It
Kick It
DZone
Email It
< Previous Tip
Next Tip >
RSS
.NET Tip of The Day
Subscribe to receive one tip from the .NET Tips and Tricks Community per day.
Previous Tips of The Day
The best of the .NET Tips & Tricks Community.
.NET Tips & Tricks Community
Every .NET practitioner has a trick up in their sleeve. This is the place to share it with other .NET people.
Submit a Tip
Discovered a new trick? Share it with others.
My Tips
Manage tips you authored.