<?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: Robust exception handling</title>
	<atom:link href="http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/feed/" rel="self" type="application/rss+xml" />
	<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/</link>
	<description>Eli Bendersky's personal website</description>
	<pubDate>Thu, 08 Jan 2009 00:59:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: risomt</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-126795</link>
		<dc:creator>risomt</dc:creator>
		<pubDate>Thu, 21 Aug 2008 21:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-126795</guid>
		<description>This isn't directly on topic but related: I've found the following snippet incredibly useful in python:

try:
    a = ''
    a.explode()
except Exception, e:
    print 'Error: ', e
    print 'Error Reason: ', e.__doc__
    print 'Exception: ', e.__class__
    
Yes - it's catching all of the errors, but it's not blindly doing so.  It's great for running shaky test code or when dealing with a very large number of unpredictable variables (a website, for example).  All it needs is a way to capture the line # :)</description>
		<content:encoded><![CDATA[<p>This isn&#8217;t directly on topic but related: I&#8217;ve found the following snippet incredibly useful in python:</p>
<p>try:<br />
    a = &#8221;<br />
    a.explode()<br />
except Exception, e:<br />
    print &#8216;Error: &#8216;, e<br />
    print &#8216;Error Reason: &#8216;, e.__doc__<br />
    print &#8216;Exception: &#8216;, e.__class__</p>
<p>Yes - it&#8217;s catching all of the errors, but it&#8217;s not blindly doing so.  It&#8217;s great for running shaky test code or when dealing with a very large number of unpredictable variables (a website, for example).  All it needs is a way to capture the line # <img src='http://eli.thegreenplace.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ripper234</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-126781</link>
		<dc:creator>ripper234</dc:creator>
		<pubDate>Thu, 21 Aug 2008 17:18:58 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-126781</guid>
		<description>(Correction - "no more" --&#62; "worse" - I wrote that it does change code behavior, just not for the better).</description>
		<content:encoded><![CDATA[<p>(Correction - &#8220;no more&#8221; &#8211;&gt; &#8220;worse&#8221; - I wrote that it does change code behavior, just not for the better).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ripper234</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-126779</link>
		<dc:creator>ripper234</dc:creator>
		<pubDate>Thu, 21 Aug 2008 16:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-126779</guid>
		<description>In Java, you cannot throw an exception you did not declare. C++'s exception declaration is no more than documentation, because it is not enforced at compile time and leads to dangerous behavior if some other exception is thrown (If I remember correctly something really bad happens like abort(), but I could be wrong).

I hate runtime-compile errors; I seriously do not understand why people tolerate languages that permit them.</description>
		<content:encoded><![CDATA[<p>In Java, you cannot throw an exception you did not declare. C++&#8217;s exception declaration is no more than documentation, because it is not enforced at compile time and leads to dangerous behavior if some other exception is thrown (If I remember correctly something really bad happens like abort(), but I could be wrong).</p>
<p>I hate runtime-compile errors; I seriously do not understand why people tolerate languages that permit them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-126767</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Thu, 21 Aug 2008 14:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-126767</guid>
		<description>Not familiar with Java, but you can specify which exceptions are thrown by a function/method in C++. On one hand, it's nice C++ allows this. On the other, I don't like the masking that happens when an unspecified exception is thrown either.
I don't think this has place in dynamic languages like Python, where exceptions might represent runtime-"compile" errors, such as accessing undeclared variables.</description>
		<content:encoded><![CDATA[<p>Not familiar with Java, but you can specify which exceptions are thrown by a function/method in C++. On one hand, it&#8217;s nice C++ allows this. On the other, I don&#8217;t like the masking that happens when an unspecified exception is thrown either.<br />
I don&#8217;t think this has place in dynamic languages like Python, where exceptions might represent runtime-&#8221;compile&#8221; errors, such as accessing undeclared variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ripper</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-126758</link>
		<dc:creator>ripper</dc:creator>
		<pubDate>Thu, 21 Aug 2008 12:40:16 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-126758</guid>
		<description>How do you stand on enforced exception specification, like Java's for example? Every method that throws an exception has to declare this fact, and the types of exceptions thrown as part of its signature.

I haven't used java intensively, but I find myself quite comfortable without this forced declaration policy. The downside is that if you add some exception time at a low level of the call stack, you either have to propagate the exception deceleration "all the way up", or mask the exception, and I don't like both options.</description>
		<content:encoded><![CDATA[<p>How do you stand on enforced exception specification, like Java&#8217;s for example? Every method that throws an exception has to declare this fact, and the types of exceptions thrown as part of its signature.</p>
<p>I haven&#8217;t used java intensively, but I find myself quite comfortable without this forced declaration policy. The downside is that if you add some exception time at a low level of the call stack, you either have to propagate the exception deceleration &#8220;all the way up&#8221;, or mask the exception, and I don&#8217;t like both options.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
