From 029c693f19ee088af329620fb729dd9005080755 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 18 Sep 2018 17:13:49 -0700 Subject: Make a note for tying inbound email to exception Then InboundEmail doesn't need to serialize or track the exception that went with it. The arrow will point the other way. --- lib/action_mailroom/mailbox.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/action_mailroom/mailbox.rb b/lib/action_mailroom/mailbox.rb index 0d03f4be6b..a2c097a42f 100644 --- a/lib/action_mailroom/mailbox.rb +++ b/lib/action_mailroom/mailbox.rb @@ -31,6 +31,8 @@ class ActionMailroom::Mailbox inbound_email.delivered! rescue => exception inbound_email.failed! + + # TODO: Include a reference to the inbound_email in the exception raised so error handling becomes easier rescue_with_handler(exception) || raise end -- cgit v1.2.3