Sha256: 65947634b92f7f27d1eda9a5055681b46d417b542bcfde94eb2103d59b188c11

Contents?: true

Size: 912 Bytes

Versions: 17

Compression:

Stored size: 912 Bytes

Contents

module RocketJob
  class JobException
    include Plugins::Document

    embedded_in :job, inverse_of: :exception
    embedded_in :slice, inverse_of: :exception
    embedded_in :dirmon_entry, inverse_of: :exception

    # Name of the exception class
    field :class_name, type: String

    # Exception message
    field :message, type: String

    # Exception Backtrace [Array<String>]
    field :backtrace, type: Array, default: []

    # Name of the server on which this exception occurred
    field :worker_name, type: String

    # The record within which this exception occurred
    field :record_number, type: Integer

    # Returns [JobException] built from the supplied exception
    def self.from_exception(exc, **args)
      new(
        args.merge(
          class_name: exc.class.name,
          message:    exc.message,
          backtrace:  exc.backtrace || []
        )
      )
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
rocketjob-5.1.1 lib/rocket_job/job_exception.rb
rocketjob-5.1.0 lib/rocket_job/job_exception.rb
rocketjob-5.0.0 lib/rocket_job/job_exception.rb
rocketjob-5.0.0.rc1 lib/rocket_job/job_exception.rb
rocketjob-5.0.0.beta4 lib/rocket_job/job_exception.rb
rocketjob-5.0.0.beta3 lib/rocket_job/job_exception.rb
rocketjob-5.0.0.beta2 lib/rocket_job/job_exception.rb
rocketjob-5.0.0.beta lib/rocket_job/job_exception.rb
rocketjob-4.3.0.beta2 lib/rocket_job/job_exception.rb
rocketjob-4.3.0.beta lib/rocket_job/job_exception.rb
rocketjob-4.2.0 lib/rocket_job/job_exception.rb
rocketjob-4.1.1 lib/rocket_job/job_exception.rb
rocketjob-4.1.0 lib/rocket_job/job_exception.rb
rocketjob-4.0.0 lib/rocket_job/job_exception.rb
rocketjob-3.5.2 lib/rocket_job/job_exception.rb
rocketjob-3.5.1 lib/rocket_job/job_exception.rb
rocketjob-3.5.0 lib/rocket_job/job_exception.rb