Project

General

Profile

« Previous | Next » 

Revision 177a5b4f

Added by Marc Dequènes almost 14 years ago

  • ID 177a5b4fab23f6cdc9d44bc3ca163e4fc2f51d4f

[fix] catch and log unexpected mail processing errors (non-CyberError exceptions)

View differences:

bin/postman
def run
logger.info "Bot starting"
@imap.check_mails do |msg|
process_message(msg)
begin
process_message(msg)
rescue CyberError => e
raise
rescue
logger.error "Mail processing crashed: " + $!
logger.error "Crash trace: " + $!.backtrace.join("\n")
true
end
end
logger.info "Bot terminating"
end

Also available in: Unified diff