commit 1cb0b3071eea8a456a1cff56d8fa33b738937770
parent a7947772fba3fa0d801ecf60f4c85c64c9dc177f
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Wed, 14 Feb 2007 01:42:17 +0000
fixed imap each throwing uncaught sourceerror
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@328 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
@@ -83,15 +83,15 @@ class PollManager
def add_new_messages_from source
return if source.done? || source.broken?
- source.each do |offset, labels|
- if source.broken?
- Redwood::log "error loading messages from #{source}: #{source.broken_msg}"
- return
- end
+ begin
+ source.each do |offset, labels|
+ if source.broken?
+ Redwood::log "error loading messages from #{source}: #{source.broken_msg}"
+ return
+ end
- labels.each { |l| LabelManager << l }
+ labels.each { |l| LabelManager << l }
- begin
m = Message.new :source => source, :source_info => offset, :labels => labels
if m.source_marked_read?
m.remove_label :unread
@@ -107,9 +107,9 @@ class PollManager
Index.add_message m
UpdateManager.relay self, :add, m
end
- rescue MessageFormatError, SourceError => e
- Redwood::log "ignoring erroneous message at #{source}##{offset}: #{e.message}"
end
+ rescue MessageFormatError, SourceError => e
+ Redwood::log "found problem with #{source}: #{e.message}"
end
end
end