nu7hatch/gmail — pull request #62 by joerixaop (2012-05-04 12:41:45+00:00)
Title: Throw authorization errors the right way (fix for 1.9)

The problem is that Net::IMAP::NoResponseError doesn't accept a string
but a response object. It then takes the message from this response
object.
Another problem (unrelated to 1.8/1.9) is that raising a different error
throws away information (message and backtrace). The error could be many
things (Too many connections, incorrect token, ...) so this hides a lot
of useful information.

The approach taken here is not tested on ruby 1.8.x and may not work
there.

This may also provide more info for issue #30