Class: River::AttemptError
- Inherits:
-
Object
- Object
- River::AttemptError
- Defined in:
- lib/job.rb
Overview
A failed job work attempt containing information about the error or panic that occurred.
Instance Attribute Summary collapse
-
#at ⇒ Object
The time at which the error occurred.
-
#attempt ⇒ Object
The attempt number on which the error occurred (maps to #attempt on a job row).
-
#error ⇒ Object
Contains the stringified error of an error returned from a job or a panic value in case of a panic.
-
#trace ⇒ Object
Contains a stack trace from a job that panicked.
Instance Method Summary collapse
-
#initialize(at:, attempt:, error:, trace:) ⇒ AttemptError
constructor
A new instance of AttemptError.
Constructor Details
#initialize(at:, attempt:, error:, trace:) ⇒ AttemptError
Returns a new instance of AttemptError.
181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/job.rb', line 181 def initialize( at:, attempt:, error:, trace: ) self.at = at self.attempt = attempt self.error = error self.trace = trace end |
Instance Attribute Details
#at ⇒ Object
The time at which the error occurred.
167 168 169 |
# File 'lib/job.rb', line 167 def at @at end |
#attempt ⇒ Object
The attempt number on which the error occurred (maps to #attempt on a job row).
171 172 173 |
# File 'lib/job.rb', line 171 def attempt @attempt end |
#error ⇒ Object
Contains the stringified error of an error returned from a job or a panic value in case of a panic.
175 176 177 |
# File 'lib/job.rb', line 175 def error @error end |
#trace ⇒ Object
Contains a stack trace from a job that panicked. The trace is produced by invoking ‘debug.Trace()` in Go.
179 180 181 |
# File 'lib/job.rb', line 179 def trace @trace end |