title: Accessing Error Messages within a Rescue Block
body: <p>Is there any way to get access to an error message in a rescue block as a string? For example:</p>
  
  <pre><code>def foo
    raise RuntimeError, "This is an error"
  end
  
  def bar
    begin
      foo
    rescue RuntimeError
      puts "Rescued"
    end
  end
  
  bar
  </code></pre>
  
  <p>Is there any way to gain access to <code>"This is an error"</code> from with-in the rescue block? Something like this:</p>
  
  <pre><code>...
  rescue RuntimeError
      puts &lt;error-message&gt;
  end
  ...
  </code></pre>