lib/rocket_job/job_exception.rb in rocketjob-3.4.3 vs lib/rocket_job/job_exception.rb in rocketjob-3.5.0

- old
+ new

@@ -20,15 +20,16 @@ # The record within which this exception occurred field :record_number, type: Integer # Returns [JobException] built from the supplied exception - def self.from_exception(exc) + def self.from_exception(exc, **args) new( - class_name: exc.class.name, - message: exc.message, - backtrace: exc.backtrace || [] + args.merge( + class_name: exc.class.name, + message: exc.message, + backtrace: exc.backtrace || [] + ) ) end - end end