<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: TalesFromTheSmellySide&lt;Code&gt; &#8211; Episode #1</title>
	<atom:link href="http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/</link>
	<description>Just another LosTechies site</description>
	<lastBuildDate>Fri, 15 Oct 2010 23:08:45 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Sean Scally</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/#comment-71</link>
		<dc:creator>Sean Scally</dc:creator>
		<pubDate>Tue, 30 Oct 2007 15:15:58 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1.aspx#comment-71</guid>
		<description>@jssingh

That is true; My problem with it is that it requires some things I don&#039;t like, such as code on both the client and server side to handle the wrapping and unwrapping of the exception in a uniform manner. I can&#039;t always make the assumption that the service is being used by someone that knows how to unwrap the exceptions properly, or even has the capability to do so.

The real problem is that the WS/SOAP specs don&#039;t allow for robust exception handling, and my understanding is that future versions of MS WebServices/WCF lets you express exception data as part of the service descriptor, which makes this whole ugly mess unnecessary :)

I sure have gotten far from the topic at hand. Back to smelly code! I may have to write a lengthier response later.</description>
		<content:encoded><![CDATA[<p>@jssingh</p>
<p>That is true; My problem with it is that it requires some things I don&#8217;t like, such as code on both the client and server side to handle the wrapping and unwrapping of the exception in a uniform manner. I can&#8217;t always make the assumption that the service is being used by someone that knows how to unwrap the exceptions properly, or even has the capability to do so.</p>
<p>The real problem is that the WS/SOAP specs don&#8217;t allow for robust exception handling, and my understanding is that future versions of MS WebServices/WCF lets you express exception data as part of the service descriptor, which makes this whole ugly mess unnecessary <img src='http://lostechies.com/joeybeninghove/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I sure have gotten far from the topic at hand. Back to smelly code! I may have to write a lengthier response later.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jssingh</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/#comment-70</link>
		<dc:creator>jssingh</dc:creator>
		<pubDate>Tue, 30 Oct 2007 02:52:30 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1.aspx#comment-70</guid>
		<description>@Sean, one of the ways to present meaningful exceptions details to the clients of the web service is to embed the actual exception within SoapException (which is the exceotion that always gets thrown to the client).

The client would basically iterate through the inner exceptions of the Soap Exception and take action accordingly. 

This explanation does not in any kind justify the mess created by an inexperienced programmer as Joey describes. That is utterly inexcusable.</description>
		<content:encoded><![CDATA[<p>@Sean, one of the ways to present meaningful exceptions details to the clients of the web service is to embed the actual exception within SoapException (which is the exceotion that always gets thrown to the client).</p>
<p>The client would basically iterate through the inner exceptions of the Soap Exception and take action accordingly. </p>
<p>This explanation does not in any kind justify the mess created by an inexperienced programmer as Joey describes. That is utterly inexcusable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Scally</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/#comment-69</link>
		<dc:creator>Sean Scally</dc:creator>
		<pubDate>Tue, 30 Oct 2007 00:08:39 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1.aspx#comment-69</guid>
		<description>Yeah, I have seen that second one from time to time. When it&#039;s out of ignorance I can forgive it, but when it&#039;s out of laziness I tend to wonder why that person is writing code.</description>
		<content:encoded><![CDATA[<p>Yeah, I have seen that second one from time to time. When it&#8217;s out of ignorance I can forgive it, but when it&#8217;s out of laziness I tend to wonder why that person is writing code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/#comment-68</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Mon, 29 Oct 2007 23:17:56 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1.aspx#comment-68</guid>
		<description>Heres the one that kills me, and makes me want to take a hammer to people&#039;s grubby little fingers:

try
{
...
...
...
}
catch(Exception e)
{
//empty block...
}

</description>
		<content:encoded><![CDATA[<p>Heres the one that kills me, and makes me want to take a hammer to people&#8217;s grubby little fingers:</p>
<p>try<br />
{<br />
&#8230;<br />
&#8230;<br />
&#8230;<br />
}<br />
catch(Exception e)<br />
{<br />
//empty block&#8230;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Ocampo</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/#comment-67</link>
		<dc:creator>Joe Ocampo</dc:creator>
		<pubDate>Mon, 29 Oct 2007 21:53:32 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1.aspx#comment-67</guid>
		<description>I would still leave in the 

catch (Exception ex)
{
...
}

and stack them, like so:

try
{
...
}
catch (SomeCustomException ex)
{
  ...
}
catch (Exception ex)
{
...
}

This way in case I missed an instance where the message is being thrown in won&#039;t break the existing behavior.  You can then incrementally refactor towards your typed exception with out worry.

You should be able to run a usage report on the class and proceed with refactoring accordingly.  I am sure I am not telling you anything you didn&#039;t already know but this is for developers that are new to refactoring legacy code.

</description>
		<content:encoded><![CDATA[<p>I would still leave in the </p>
<p>catch (Exception ex)<br />
{<br />
&#8230;<br />
}</p>
<p>and stack them, like so:</p>
<p>try<br />
{<br />
&#8230;<br />
}<br />
catch (SomeCustomException ex)<br />
{<br />
  &#8230;<br />
}<br />
catch (Exception ex)<br />
{<br />
&#8230;<br />
}</p>
<p>This way in case I missed an instance where the message is being thrown in won&#8217;t break the existing behavior.  You can then incrementally refactor towards your typed exception with out worry.</p>
<p>You should be able to run a usage report on the class and proceed with refactoring accordingly.  I am sure I am not telling you anything you didn&#8217;t already know but this is for developers that are new to refactoring legacy code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Scally</title>
		<link>http://lostechies.com/joeybeninghove/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1/#comment-66</link>
		<dc:creator>Sean Scally</dc:creator>
		<pubDate>Mon, 29 Oct 2007 18:57:26 +0000</pubDate>
		<guid isPermaLink="false">/blogs/joeydotnet/archive/2007/10/29/talesfromthesmellyside-lt-code-gt-episode-1.aspx#comment-66</guid>
		<description>I&#039;ve seen this before in a situation that was not totally &quot;wtf&quot;-based. It was in code that was dealing with a web service. Legacy .NET 1.1 and 2.0 web services only can throw one kind of exception, so if you want to include any other sort of information to the client, you have to either use return values or sniff exception strings. 

I&#039;m not saying that was the case here, or that even that particular situation forgives such a practice... :)</description>
		<content:encoded><![CDATA[<p>I&#8217;ve seen this before in a situation that was not totally &#8220;wtf&#8221;-based. It was in code that was dealing with a web service. Legacy .NET 1.1 and 2.0 web services only can throw one kind of exception, so if you want to include any other sort of information to the client, you have to either use return values or sniff exception strings. </p>
<p>I&#8217;m not saying that was the case here, or that even that particular situation forgives such a practice&#8230; <img src='http://lostechies.com/joeybeninghove/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
