diff options
author | Aidan Haran <aidanharan@Aidans-MacBook-Pro.local> | 2017-09-16 19:59:32 +0100 |
---|---|---|
committer | Aidan Haran <aidanharan@Aidans-MacBook-Pro.local> | 2017-09-16 19:59:32 +0100 |
commit | 3291fa3630c456450f8c6a9b771f77c293d036cd (patch) | |
tree | d8b3a6311df9b233955209d6c33f0fa07c2c7285 /activejob/CHANGELOG.md | |
parent | 34956f7422798f27f8926544d58771042f6f1c3a (diff) | |
download | rails-3291fa3630c456450f8c6a9b771f77c293d036cd.tar.gz rails-3291fa3630c456450f8c6a9b771f77c293d036cd.tar.bz2 rails-3291fa3630c456450f8c6a9b771f77c293d036cd.zip |
Allow for custom handling of exceptions that are discarded
Diffstat (limited to 'activejob/CHANGELOG.md')
-rw-r--r-- | activejob/CHANGELOG.md | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md index 77dfdefc05..32bf5a4b50 100644 --- a/activejob/CHANGELOG.md +++ b/activejob/CHANGELOG.md @@ -1,3 +1,19 @@ +* Allow block to be passed to ActiveJob::Base.discard_on to allow custom handling of discard jobs. + + Example: + + class RemoteServiceJob < ActiveJob::Base + discard_on(CustomAppException) do |job, exception| + ExceptionNotifier.caught(exception) + end + + def perform(*args) + # Might raise CustomAppException for something domain specific + end + end + + *Aidan Haran* + * Change logging instrumentation to log errors when a job raises an exception. Fixes #26848. |