<?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: Why catch Throwable is evil &#8211; A real life story</title>
	<atom:link href="http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/</link>
	<description>Software Development, Java, and some more.</description>
	<lastBuildDate>Tue, 15 Nov 2011 03:25:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Gili Nachum</title>
		<link>http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/comment-page-1/#comment-1836</link>
		<dc:creator>Gili Nachum</dc:creator>
		<pubDate>Tue, 28 Sep 2010 17:07:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=110#comment-1836</guid>
		<description>I Don&#039;t quite agree, I think it&#039;s more subtle than that:

At the top level loop (say the thread&#039;s run() method) you are expected to behave in a coarse-grained, coz at this point all you really care about is preventing your thread from dieing because of some random NumberFormatException, or NPE, that is better to swallow than to allow it to bubble up and kill the thread.

Most programmers, try to accomplish this be swallowing Throwable, causing them to also swallow Errors (JVM unrecoverable problems), while they really wanted was to swallow Exceptions (recoverable problems).</description>
		<content:encoded><![CDATA[<p>I Don&#8217;t quite agree, I think it&#8217;s more subtle than that:</p>
<p>At the top level loop (say the thread&#8217;s run() method) you are expected to behave in a coarse-grained, coz at this point all you really care about is preventing your thread from dieing because of some random NumberFormatException, or NPE, that is better to swallow than to allow it to bubble up and kill the thread.</p>
<p>Most programmers, try to accomplish this be swallowing Throwable, causing them to also swallow Errors (JVM unrecoverable problems), while they really wanted was to swallow Exceptions (recoverable problems).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: inca</title>
		<link>http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/comment-page-1/#comment-1835</link>
		<dc:creator>inca</dc:creator>
		<pubDate>Tue, 28 Sep 2010 16:27:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=110#comment-1835</guid>
		<description>Well, I&#039;d rather say that performing coarse-grained exception handling is evil (just like in your case, you &quot;swallow&quot; an exception at thread-level without concerning about the nature of an exception and how to avoid it).</description>
		<content:encoded><![CDATA[<p>Well, I&#8217;d rather say that performing coarse-grained exception handling is evil (just like in your case, you &#8220;swallow&#8221; an exception at thread-level without concerning about the nature of an exception and how to avoid it).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Catching Throwable in Scala : spiros.blog()</title>
		<link>http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/comment-page-1/#comment-1822</link>
		<dc:creator>Catching Throwable in Scala : spiros.blog()</dc:creator>
		<pubDate>Mon, 20 Sep 2010 06:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=110#comment-1822</guid>
		<description>[...] to use the above code in your programs since it is shorter but if catching Throwable in Java is evil then catching Throwable in Scala is ten times more [...]</description>
		<content:encoded><![CDATA[<p>[...] to use the above code in your programs since it is shorter but if catching Throwable in Java is evil then catching Throwable in Scala is ten times more [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gili Nachum</title>
		<link>http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/comment-page-1/#comment-1743</link>
		<dc:creator>Gili Nachum</dc:creator>
		<pubDate>Mon, 14 Jun 2010 07:06:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=110#comment-1743</guid>
		<description>I believe Guy verified that on Windows.
I&#039;m not sure why Linux lightweight processes (LWP) would make a difference in this case. But as these behaviors are not specified no where, and are prone to be OS and JVM vendor and version depended, anything goes. Better not count on it.

We need some clear specifications from the JCP on overall JVM behavior in case of OOME.</description>
		<content:encoded><![CDATA[<p>I believe Guy verified that on Windows.<br />
I&#8217;m not sure why Linux lightweight processes (LWP) would make a difference in this case. But as these behaviors are not specified no where, and are prone to be OS and JVM vendor and version depended, anything goes. Better not count on it.</p>
<p>We need some clear specifications from the JCP on overall JVM behavior in case of OOME.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: danskal</title>
		<link>http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/comment-page-1/#comment-1736</link>
		<dc:creator>danskal</dc:creator>
		<pubDate>Thu, 10 Jun 2010 15:32:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=110#comment-1736</guid>
		<description>Hi Guy,

thanks for checking the thread thing - it would be nice to know which platform you tested on, as different platforms may implement threading differently. On linux, I believe, threads are processes, unlike windows.

Can we assume you used windows from the icons on your post?

/Michael</description>
		<content:encoded><![CDATA[<p>Hi Guy,</p>
<p>thanks for checking the thread thing &#8211; it would be nice to know which platform you tested on, as different platforms may implement threading differently. On linux, I believe, threads are processes, unlike windows.</p>
<p>Can we assume you used windows from the icons on your post?</p>
<p>/Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guy Moshkowich</title>
		<link>http://www.javatuning.com/why-catch-throwable-is-evil-real-life-story/comment-page-1/#comment-1050</link>
		<dc:creator>Guy Moshkowich</dc:creator>
		<pubDate>Wed, 29 Jul 2009 13:33:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.javatuning.com/?p=110#comment-1050</guid>
		<description>Thanks for the great article.
I&#039;ve wrote a simple code that generates 2 threads were one of them created out of memory error - and the other thread kept working.
I&#039;ve validate this on both IBM and SUN JVM.
So the conclusion is that the JVM does not terminate when OOME occurs.</description>
		<content:encoded><![CDATA[<p>Thanks for the great article.<br />
I&#8217;ve wrote a simple code that generates 2 threads were one of them created out of memory error &#8211; and the other thread kept working.<br />
I&#8217;ve validate this on both IBM and SUN JVM.<br />
So the conclusion is that the JVM does not terminate when OOME occurs.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

