Permalink
Browse files

Removed deprecated #original_exception in ActiveJob::DeserializationE…

…rror
  • Loading branch information...
rafaelfranca committed Oct 10, 2016
1 parent b9ba263 commit d861a1fcf8401a173876489d8cee1ede1cecde3b
Showing with 5 additions and 13 deletions.
  1. +4 −0 activejob/CHANGELOG.md
  2. +1 −13 activejob/lib/active_job/arguments.rb
View
@@ -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,
@@ -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

0 comments on commit d861a1f

Please sign in to comment.