Skip to content

Commit d861a1f

Browse files
committed
Removed deprecated #original_exception in ActiveJob::DeserializationError
1 parent b9ba263 commit d861a1f

2 files changed

Lines changed: 5 additions & 13 deletions

File tree

activejob/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
* Removed deprecated `#original_exception` in `ActiveJob::DeserializationError`.
2+
3+
*Rafael Mendonça França*
4+
15
* Added instance variable `@queue` to JobWrapper.
26

37
This will fix issues in [resque-scheduler](https://github.com/resque/resque-scheduler) `#job_to_hash` method,

activejob/lib/active_job/arguments.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,10 @@ module ActiveJob
55
#
66
# Wraps the original exception raised as +cause+.
77
class DeserializationError < StandardError
8-
def initialize(e = nil) #:nodoc:
9-
if e
10-
ActiveSupport::Deprecation.warn("Passing #original_exception is deprecated and has no effect. " \
11-
"Exceptions will automatically capture the original exception.", caller)
12-
end
13-
8+
def initialize #:nodoc:
149
super("Error while trying to deserialize arguments: #{$!.message}")
1510
set_backtrace $!.backtrace
1611
end
17-
18-
# The original exception that was raised during deserialization of job
19-
# arguments.
20-
def original_exception
21-
ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller)
22-
cause
23-
end
2412
end
2513

2614
# Raised when an unsupported argument type is set as a job argument. We

0 commit comments

Comments
 (0)