FIX: If there is an exception when parsing one email, don't stop all

work, return an error code and continue.
This commit is contained in:
Robin Ward
2014-02-12 12:08:34 -05:00
parent 62592215f4
commit 318e692290
2 changed files with 13 additions and 1 deletions

View File

@ -6,7 +6,7 @@ module Email
class Receiver
def self.results
@results ||= Enum.new(:unprocessable, :missing, :processed)
@results ||= Enum.new(:unprocessable, :missing, :processed, :error)
end
attr_reader :body, :reply_key, :email_log
@ -46,6 +46,8 @@ module Email
create_reply
Email::Receiver.results[:processed]
rescue
Email::Receiver.results[:error]
end
private