<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: exceptions considered harmful</title>
	<atom:link href="http://silkandspinach.net/2005/06/14/exceptions-considered-harmful/feed/" rel="self" type="application/rss+xml" />
	<link>http://silkandspinach.net/2005/06/14/exceptions-considered-harmful/</link>
	<description>development, by example</description>
	<lastBuildDate>Tue, 07 Feb 2012 05:40:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Ashley Moran</title>
		<link>http://silkandspinach.net/2005/06/14/exceptions-considered-harmful/#comment-15874</link>
		<dc:creator><![CDATA[Ashley Moran]]></dc:creator>
		<pubDate>Sun, 20 Dec 2009 19:12:06 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.wordpress.com/2005/06/14/exceptions-considered-harmful/#comment-15874</guid>
		<description><![CDATA[Hmmm.  The fact that this looks like the tail wagging the dog is just an implication of dependency inversion, and &quot;telling an object to display itself&quot; can be handled with a strategy.  Yes? No?

(I didn&#039;t work it through in code to see where it led...)]]></description>
		<content:encoded><![CDATA[<p>Hmmm.  The fact that this looks like the tail wagging the dog is just an implication of dependency inversion, and &#8220;telling an object to display itself&#8221; can be handled with a strategy.  Yes? No?</p>
<p>(I didn&#8217;t work it through in code to see where it led&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 2005 silk and spinach top ten &#171; silk and spinach</title>
		<link>http://silkandspinach.net/2005/06/14/exceptions-considered-harmful/#comment-15517</link>
		<dc:creator><![CDATA[2005 silk and spinach top ten &#171; silk and spinach]]></dc:creator>
		<pubDate>Tue, 30 Jun 2009 15:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.wordpress.com/2005/06/14/exceptions-considered-harmful/#comment-15517</guid>
		<description><![CDATA[[...] exceptions considered harmful [...]]]></description>
		<content:encoded><![CDATA[<p>[...] exceptions considered harmful [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://silkandspinach.net/2005/06/14/exceptions-considered-harmful/#comment-160</link>
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Wed, 19 Oct 2005 14:26:57 +0000</pubDate>
		<guid isPermaLink="false">http://silkandspinach.wordpress.com/2005/06/14/exceptions-considered-harmful/#comment-160</guid>
		<description><![CDATA[I just stumbled onto your blog recently, and find it extremely interesting.
I can&#039;t agree on the exceptions issue, for several reasons. First is because the context of the exception matters. Two cases of interest are:

internal code paths
component boundaries (APIs, roughly)

Internal code paths littered with exception-handling logic are deadly to maintainability, and annoying to boot. If you have a chain of private methods, having each one catch and handle exceptions, or provide null-object semantics, is a waste of time. Until you reach the component boundary, there&#039;s no harm, and quite a bit of good, in throwing the exceptions.
At the component boundary, it&#039;s not always feasible to provide a NullObject equivalent. Doing so implies that the return type must account for every potential use, by a GUI or invoking service, and that&#039;s the tail wagging the dog. In your example, &quot;telling an object to display itself&quot; is quite involved. Now any object which can ever (in any way) be &quot;displayed&quot; (which implies any form of output at all) must provide not only that display logic, but also corresponding null-object display logic, which can be very different indeed (e.g. a message in a special buffer or area of the screen, rather than the table of results).
Again, this implies a very nasty chain; much nastier than just catching exceptions at user boundaries, or at worst throwing abstraction-level exceptions as appropriate (e.g. &quot;throw new UserInformationNotAvailble()&quot; rather than an LDAP or SQL or whatever Exception).
]]></description>
		<content:encoded><![CDATA[<p>I just stumbled onto your blog recently, and find it extremely interesting.<br />
I can&#8217;t agree on the exceptions issue, for several reasons. First is because the context of the exception matters. Two cases of interest are:</p>
<p>internal code paths<br />
component boundaries (APIs, roughly)</p>
<p>Internal code paths littered with exception-handling logic are deadly to maintainability, and annoying to boot. If you have a chain of private methods, having each one catch and handle exceptions, or provide null-object semantics, is a waste of time. Until you reach the component boundary, there&#8217;s no harm, and quite a bit of good, in throwing the exceptions.<br />
At the component boundary, it&#8217;s not always feasible to provide a NullObject equivalent. Doing so implies that the return type must account for every potential use, by a GUI or invoking service, and that&#8217;s the tail wagging the dog. In your example, &#8220;telling an object to display itself&#8221; is quite involved. Now any object which can ever (in any way) be &#8220;displayed&#8221; (which implies any form of output at all) must provide not only that display logic, but also corresponding null-object display logic, which can be very different indeed (e.g. a message in a special buffer or area of the screen, rather than the table of results).<br />
Again, this implies a very nasty chain; much nastier than just catching exceptions at user boundaries, or at worst throwing abstraction-level exceptions as appropriate (e.g. &#8220;throw new UserInformationNotAvailble()&#8221; rather than an LDAP or SQL or whatever Exception).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

