diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-18 17:13:49 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2018-09-18 17:13:49 -0700 |
commit | 029c693f19ee088af329620fb729dd9005080755 (patch) | |
tree | 0601084c0857ebb3a0ef23df6dbd5d1b9de3e5b9 /lib/action_mailroom | |
parent | 0f140fe15852b829d22864a2f7664440204ac723 (diff) | |
download | rails-029c693f19ee088af329620fb729dd9005080755.tar.gz rails-029c693f19ee088af329620fb729dd9005080755.tar.bz2 rails-029c693f19ee088af329620fb729dd9005080755.zip |
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.
Diffstat (limited to 'lib/action_mailroom')
-rw-r--r-- | lib/action_mailroom/mailbox.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |