1

Closed

Using hides errors

description

There are some code sections using the "using" statement. This can hide errors happening inside the statement. See more at: http://msdn2.microsoft.com/en-us/library/aa355056.aspx
 
instead of
 
using(ITransmitMessageOneWayNative channel = serviceFactory.CreateClient<ITransmitMessageOneWayNative>()){
 
channel.SendOneWay(msg);
channel.Close();
}
 
one can use
 
ITransmitMessageOneWayNative channel = serviceFactory.CreateClient<ITransmitMessageOneWayNative>();
try
{
channel.SendOneWay(msg);
channel.Close();
}
catch (Exception e)
{
channel.Abort();
throw;
}
Closed Feb 18, 2007 at 10:16 PM by Morty
Fixed to work with RTM bits

comments

MartinBring wrote Dec 19, 2006 at 7:29 AM

Impact should be high

wrote Feb 18, 2007 at 10:16 PM

wrote Feb 12, 2013 at 7:59 PM

wrote May 15, 2013 at 1:32 AM