diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-10 14:55:20 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-10-10 14:55:20 -0300 |
commit | d861a1fcf8401a173876489d8cee1ede1cecde3b (patch) | |
tree | 0c083b2c33eb9616beed83c4c95caf562abf7860 /activejob | |
parent | b9ba263e5aaa151808df058f5babfed016a1879f (diff) | |
download | rails-d861a1fcf8401a173876489d8cee1ede1cecde3b.tar.gz rails-d861a1fcf8401a173876489d8cee1ede1cecde3b.tar.bz2 rails-d861a1fcf8401a173876489d8cee1ede1cecde3b.zip |
Removed deprecated #original_exception in ActiveJob::DeserializationError
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/CHANGELOG.md | 4 | ||||
-rw-r--r-- | activejob/lib/active_job/arguments.rb | 14 |
2 files changed, 5 insertions, 13 deletions
diff --git a/activejob/CHANGELOG.md b/activejob/CHANGELOG.md index ef62b2136b..1142c84d33 100644 --- a/activejob/CHANGELOG.md +++ b/activejob/CHANGELOG.md @@ -1,3 +1,7 @@ +* Removed deprecated `#original_exception` in `ActiveJob::DeserializationError`. + + *Rafael Mendonça França* + * Added instance variable `@queue` to JobWrapper. This will fix issues in [resque-scheduler](https://github.com/resque/resque-scheduler) `#job_to_hash` method, diff --git a/activejob/lib/active_job/arguments.rb b/activejob/lib/active_job/arguments.rb index 23e237c1b7..523a0e7f33 100644 --- a/activejob/lib/active_job/arguments.rb +++ b/activejob/lib/active_job/arguments.rb @@ -5,22 +5,10 @@ module ActiveJob # # Wraps the original exception raised as +cause+. class DeserializationError < StandardError - def initialize(e = nil) #:nodoc: - if e - ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. " \ - "Exceptions will automatically capture the original exception.", caller) - end - + def initialize #:nodoc: super("Error while trying to deserialize arguments: #{$!.message}") set_backtrace $!.backtrace end - - # The original exception that was raised during deserialization of job - # arguments. - def original_exception - ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller) - cause - end end # Raised when an unsupported argument type is set as a job argument. We |