Class: ActiveJob::ExecutionError

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_job/execution_error.rb

Overview

Information about a given error when executing a job.

It's attached to failed jobs at ActiveJob::Base#last_execution_error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#backtraceObject

Returns the value of attribute backtrace

Returns:

  • (Object)

    the current value of backtrace



4
5
6
# File 'lib/active_job/execution_error.rb', line 4

def backtrace
  @backtrace
end

#error_classObject

Returns the value of attribute error_class

Returns:

  • (Object)

    the current value of error_class



4
5
6
# File 'lib/active_job/execution_error.rb', line 4

def error_class
  @error_class
end

#messageObject

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



4
5
6
# File 'lib/active_job/execution_error.rb', line 4

def message
  @message
end

Instance Method Details

#to_sObject



5
6
7
# File 'lib/active_job/execution_error.rb', line 5

def to_s
  "ERROR #{error_class}: #{message}\n#{backtrace&.collect { |line| "\t#{line}" }&.join("\n")}"
end