Exception: ActiveJob::DeserializationError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_job/arguments.rb

Overview

Raised when an exception is raised during job arguments deserialization.

Wraps the original exception raised as cause.

Instance Method Summary collapse

Constructor Details

#initialize(e = nil) ⇒ DeserializationError

:nodoc:



8
9
10
11
12
13
14
15
16
# File 'lib/active_job/arguments.rb', line 8

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

  super("Error while trying to deserialize arguments: #{$!.message}")
  set_backtrace $!.backtrace
end

Instance Method Details

#original_exceptionObject

The original exception that was raised during deserialization of job arguments.



20
21
22
23
# File 'lib/active_job/arguments.rb', line 20

def original_exception
  ActiveSupport::Deprecation.warn("#original_exception is deprecated. Use #cause instead.", caller)
  cause
end