Removed deprecated #original_exception in ActiveJob::DeserializationError

上级 b9ba263e
* 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册