fix deliver_via_email for ruby 1.8.
fixes CNVS-4196 Timeout::Error doesn't inherit from StandardError in < 1.9, causing some exceptions to not be properly handled in deliver_via_email. test plan: * run spec/lib/message_dispatcher_spec.rb with ruby 1.8 and verify that specs pass. Change-Id: I233c62a5960e27804ef37f529512bb39b8746239 Reviewed-on: https://gerrit.instructure.com/18079 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Joel Hough <joel@instructure.com> QA-Review: Bryan Madsen <bryan@instructure.com> Reviewed-by: Eric Berry <ericb@instructure.com> Tested-by: Eric Berry <ericb@instructure.com>
This commit is contained in:
parent
f032a82046
commit
6f01c7cfcd
|
@ -609,7 +609,7 @@ class Message < ActiveRecord::Base
|
|||
@exception = e
|
||||
logger.error "Exception: #{e.class}: #{e.message}\n\t#{e.backtrace.join("\n\t")}"
|
||||
cancel if e.message.try(:match, /Bad recipient/)
|
||||
rescue => e
|
||||
rescue StandardError, Timeout::Error => e
|
||||
@exception = e
|
||||
logger.error "Exception: #{e.class}: #{e.message}\n\t#{e.backtrace.join("\n\t")}"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue