sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit a96e3781cdc815da5fad94cf2fcc1abe099cc0e2
parent 4e88c9d6947945bfed578ebabfd32f6b8371041f
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date:   Thu,  4 Jan 2007 06:16:24 +0000

sometimes rmail fails, apparently?


git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@171 5c8cc53c-5e98-4d25-b20a-d8db53a31250

Diffstat:
M lib/sup/message.rb | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
@@ -179,7 +179,7 @@ class Message
         begin
 #          read_header @source.load_header(@source_info) ##XXXX is this ok?
           message_to_chunks @source.load_message(@source_info)
-        rescue SourceError, SocketError => e
+        rescue SourceError, SocketError, MessageFormatError => e
           [Text.new(error_message(e.message))]
         end
       end
@@ -246,9 +246,7 @@ private
     ret = [] <<
       case m.header.content_type
       when "text/plain", nil
-        raise MessageFormatError, "no message body before decode (source #@source info #@source_info)" unless
-          m.body
-        body = m.decode or raise MessageFormatError, "no message body"
+        m.body && body = m.decode or raise MessageFormatError, "for some bizarre reason, RubyMail was unable to parse this message."
         text_to_chunks body.normalize_whitespace.split("\n")
       when /^multipart\//
         nil