<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Wikid Blog: by Wikid Labs &#187; ruby</title>
	<atom:link href="http://www.wikidlabs.com/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wikidlabs.com</link>
	<description></description>
	<lastBuildDate>Mon, 15 Nov 2010 20:24:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ruby Stuff: Use retry to restart a begin rescue block</title>
		<link>http://www.wikidlabs.com/ruby-stuff-use-retry-to-restart-a-begin-rescue-block/</link>
		<comments>http://www.wikidlabs.com/ruby-stuff-use-retry-to-restart-a-begin-rescue-block/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 03:45:14 +0000</pubDate>
		<dc:creator>DL</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.wikidlabs.com/ruby-stuff-use-retry-to-restart-a-begin-rescue-block/</guid>
		<description><![CDATA[I recently needed to be able retry a begin block and was simply nesting begins within begins, then I ran across this little Ruby gym. The retry, http://www.tutorialspoint.com/ruby/ruby_exceptions.htm. begin @calendarapi.calendars rescue Exception =&#62; ex logger.info ex switch_ssl() retry end Obviously this bit of code could end in a continuous loop so be careful to add [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to be able retry a begin block and was simply nesting begins within begins, then I ran across this little Ruby gym. The retry, http://www.tutorialspoint.com/ruby/ruby_exceptions.htm.</p>
<pre class="brush: php">
    begin
      @calendarapi.calendars
    rescue Exception =&gt; ex
      logger.info ex
      switch_ssl()
      retry
    end
</pre>
<p>Obviously this bit of code could end in a continuous loop so be careful to add a little logic to ensure a clean exit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wikidlabs.com/ruby-stuff-use-retry-to-restart-a-begin-rescue-block/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

