<?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: Don&#8217;t Rethrow, Please</title>
	<atom:link href="http://devgrind.com/2008/09/08/dont-rethrow-please/feed/" rel="self" type="application/rss+xml" />
	<link>http://devgrind.com/2008/09/08/dont-rethrow-please/</link>
	<description>thinking outside the { }</description>
	<lastBuildDate>Thu, 03 Dec 2009 20:17:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Suraj Kurapati</title>
		<link>http://devgrind.com/2008/09/08/dont-rethrow-please/comment-page-1/#comment-177</link>
		<dc:creator>Suraj Kurapati</dc:creator>
		<pubDate>Thu, 03 Dec 2009 20:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://devgrind.com/?p=51#comment-177</guid>
		<description>What if we re-raise the same error we rescued?

begin
  raise &#039;foo!&#039;
rescue =&gt; error
  error.message.insert 0, &quot;error when trying to do foo: &quot;
  raise error
end

Then you won&#039;t lose the original stack trace and you&#039;ll get added information in the error message.</description>
		<content:encoded><![CDATA[<p>What if we re-raise the same error we rescued?</p>
<p>begin<br />
  raise &#8216;foo!&#8217;<br />
rescue =&gt; error<br />
  error.message.insert 0, &#8220;error when trying to do foo: &#8221;<br />
  raise error<br />
end</p>
<p>Then you won&#8217;t lose the original stack trace and you&#8217;ll get added information in the error message.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
