<?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"
	>
<channel>
	<title>Comments on: My 2 Cents on Checked Exceptions</title>
	<atom:link href="http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/</link>
	<description>Jing Xue's Weblog</description>
	<pubDate>Fri, 21 Nov 2008 12:52:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: The Path to Zen &#187; Blog Archive &#187; Checked Exceptions and Alternate Business Flows</title>
		<link>http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/#comment-42228</link>
		<dc:creator>The Path to Zen &#187; Blog Archive &#187; Checked Exceptions and Alternate Business Flows</dc:creator>
		<pubDate>Tue, 17 Jul 2007 17:57:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/#comment-42228</guid>
		<description>[...] I have always had problems with Java's checked exceptions, I had a little debate with Debasish in the comments section of his recent blog post regarding [...]</description>
		<content:encoded><![CDATA[<p>[...] I have always had problems with Java&#8217;s checked exceptions, I had a little debate with Debasish in the comments section of his recent blog post regarding [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jing Xue</title>
		<link>http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/#comment-10862</link>
		<dc:creator>Jing Xue</dc:creator>
		<pubDate>Wed, 09 Aug 2006 14:21:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/#comment-10862</guid>
		<description>&lt;blockquote&gt;The whole point of checked exceptions is that they must be handled, requiring at least _some_ thought.&lt;/blockquote&gt;
I understand that, and am precisely against the "must" and "requiring" part - attention needs to be paid to _who_ is requiring _whom_ here.  A callee should only put requirement on the _input_, not the _output_.  How would you like it if your favorite restaurant made you sign a formal contract to guarantee you'll consume the food you are taking home? :)</description>
		<content:encoded><![CDATA[<blockquote><p>The whole point of checked exceptions is that they must be handled, requiring at least _some_ thought.</p></blockquote>
<p>I understand that, and am precisely against the &#8220;must&#8221; and &#8220;requiring&#8221; part - attention needs to be paid to _who_ is requiring _whom_ here.  A callee should only put requirement on the _input_, not the _output_.  How would you like it if your favorite restaurant made you sign a formal contract to guarantee you&#8217;ll consume the food you are taking home? <img src='http://www.digizenstudio.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/#comment-10855</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 09 Aug 2006 13:27:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.digizenstudio.com/blog/2006/08/08/my-2-cents-on-checked-exceptions/#comment-10855</guid>
		<description>The whole point of checked exceptions is that they must be handled, requiring at least _some_ thought. Consider what it used to be like in C - functions used return values to indicate errors, and they were never looked at.

When desiging your own APIs, good use of the Null Object pattern can work here. For example, if you don't want to have an "AccountNotFoundException", you could provide an "accountExists" method (returning true or false), plus have the getAccount method return a NullObject Account that barfs if it is used. Callers who respect the API will never encounter the problem, and callers who don't respect the API still get exceptions.</description>
		<content:encoded><![CDATA[<p>The whole point of checked exceptions is that they must be handled, requiring at least _some_ thought. Consider what it used to be like in C - functions used return values to indicate errors, and they were never looked at.</p>
<p>When desiging your own APIs, good use of the Null Object pattern can work here. For example, if you don&#8217;t want to have an &#8220;AccountNotFoundException&#8221;, you could provide an &#8220;accountExists&#8221; method (returning true or false), plus have the getAccount method return a NullObject Account that barfs if it is used. Callers who respect the API will never encounter the problem, and callers who don&#8217;t respect the API still get exceptions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
