title: How to catch Errno::ECONNRESET class in "case when"?
body: <p>My application (Ruby 1.9.2) may raise different exceptions, including net-connection breaks. I <code>rescue Exception =&gt; e</code>, then do <code>case/when</code> to handle them in defferent ways, but several errors go through my cases straight to <code>else</code>.</p>
  
  <pre><code>rescue Exception =&gt; e
      p e.class
      case e.class
          when Errno::ECONNRESET
              p 1
          when Errno::ECONNRESET,Errno::ECONNABORTED,Errno::ETIMEDOUT
              p 2
          else
              p 3
      end
  end
  </code></pre>
  
  <p>Prints:</p>
  
  <pre><code>Errno::ECONNRESET
  3
  </code></pre>