1
vote
Vote UpVote

C# Using Blocks can Swallow Exceptions | DigitallyCreated

The Wiert Corner – I got to the SafeUsingBlock extension method because of a nice StackOverflow thread on exceptions swallowed in a using block. Actually, you can broaden the case into a wider scope: in any language when you protect resources in a try finally block (essentially, a using will turn into an implicit try finally block), and both the core logic and the finally throw an exception, the exception from the core block is swallowed. Simple C# example: using System; public class Example { public void Main() { try { try { throw new ...
Favorite? Off-Topic? jpluimers @ 2011-09-22 07:00

Statistics

Visits: 563
Votes: 1
Favorites: 0
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

vcldeveloper
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)