<?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>
	<lastBuildDate>Wed, 10 Mar 2010 17:32:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: eliben</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-175985</link>
		<dc:creator>eliben</dc:creator>
		<pubDate>Fri, 12 Jun 2009 04:45:33 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-175985</guid>
		<description>@Dan: fixed, thanks</description>
		<content:encoded><![CDATA[<p>@Dan: fixed, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-175852</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Thu, 11 Jun 2009 09:00:49 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-175852</guid>
		<description>Your second code section has a syntax error
it is missing the &#039;:&#039; at the end of this line
except IOError, e</description>
		<content:encoded><![CDATA[<p>Your second code section has a syntax error<br />
it is missing the &#8216;:&#8217; at the end of this line<br />
except IOError, e</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Darren</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-163232</link>
		<dc:creator>Darren</dc:creator>
		<pubDate>Thu, 26 Mar 2009 08:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-163232</guid>
		<description>I&#039;m a newbie when it comes to programming in python but the concept of site wide handling mentioned above is quite interesting. Any chances of giving an example of how the coding is done?

Btw, thanks Eli for such a comprehensive article on exception handling. Really helpful!</description>
		<content:encoded><![CDATA[<p>I&#8217;m a newbie when it comes to programming in python but the concept of site wide handling mentioned above is quite interesting. Any chances of giving an example of how the coding is done?</p>
<p>Btw, thanks Eli for such a comprehensive article on exception handling. Really helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brisbane Website Designer</title>
		<link>http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/comment-page-1/#comment-152510</link>
		<dc:creator>Brisbane Website Designer</dc:creator>
		<pubDate>Sun, 18 Jan 2009 19:24:31 +0000</pubDate>
		<guid isPermaLink="false">http://eli.thegreenplace.net/2008/08/21/robust-exception-handling/#comment-152510</guid>
		<description>Consider implementing a site-wide error handler.  Its amazing what you start learning when you start dumping your errors to disk and spend the time to read them and fix your code up.  Chances are you will whittle down your exception count significantly in very short order.</description>
		<content:encoded><![CDATA[<p>Consider implementing a site-wide error handler.  Its amazing what you start learning when you start dumping your errors to disk and spend the time to read them and fix your code up.  Chances are you will whittle down your exception count significantly in very short order.</p>
]]></content:encoded>
	</item>
	<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&#039;t directly on topic but related: I&#039;ve found the following snippet incredibly useful in python:

try:
    a = &#039;&#039;
    a.explode()
except Exception, e:
    print &#039;Error: &#039;, e
    print &#039;Error Reason: &#039;, e.__doc__
    print &#039;Exception: &#039;, e.__class__
    
Yes - it&#039;s catching all of the errors, but it&#039;s not blindly doing so.  It&#039;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 &#8211; 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 - &quot;no more&quot; --&gt; &quot;worse&quot; - I wrote that it does change code behavior, just not for the better).</description>
		<content:encoded><![CDATA[<p>(Correction &#8211; &#8220;no more&#8221; &#8211;&gt; &#8220;worse&#8221; &#8211; 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++&#039;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&#039;s nice C++ allows this. On the other, I don&#039;t like the masking that happens when an unspecified exception is thrown either.
I don&#039;t think this has place in dynamic languages like Python, where exceptions might represent runtime-&quot;compile&quot; 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&#039;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&#039;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 &quot;all the way up&quot;, or mask the exception, and I don&#039;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>
