From: wmorgan Date: Fri, 5 Jan 2007 23:09:30 +0000 (+0000) Subject: yet more error-handling minor tweaks. jesus christ i hope it works now. X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=f1abd6a52e639a62e211e7de17dd8e8b9eea9362;p=sup yet more error-handling minor tweaks. jesus christ i hope it works now. git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@197 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/lib/sup/imap.rb b/lib/sup/imap.rb index da6a311..a3dca47 100644 --- a/lib/sup/imap.rb +++ b/lib/sup/imap.rb @@ -147,7 +147,7 @@ class IMAP < Source begin connect scan_mailbox - rescue SocketError, Net::IMAP::Error, SourceError => e + rescue SocketError, Net::IMAP::Error => e die_from e, :while => "scanning mailbox" end end @@ -218,7 +218,7 @@ private f = @imap.fetch imap_id, (fields + ['RFC822.SIZE', 'INTERNALDATE']).uniq got_id = make_id f[0] die_from "IMAP message mismatch: requested #{id}, got #{got_id}.", :suggest_rebuild => true unless id == got_id - rescue SocketError, Net::IMAP::Error + rescue SocketError, Net::IMAP::Error => e die_from e, :while => "communicating with IMAP server" rescue Errno::EPIPE if (retries += 1) <= 3