Exception: ScreenshotFreeAPI::JobFailedError
- Inherits:
-
StandardError
- Object
- StandardError
- ScreenshotFreeAPI::JobFailedError
- Defined in:
- lib/screenshotfreeapi/errors.rb
Overview
Raised when polling a job that has transitioned to the FAILED state.
Instance Attribute Summary collapse
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(job_id, reason) ⇒ JobFailedError
constructor
A new instance of JobFailedError.
Constructor Details
#initialize(job_id, reason) ⇒ JobFailedError
Returns a new instance of JobFailedError.
72 73 74 75 76 |
# File 'lib/screenshotfreeapi/errors.rb', line 72 def initialize(job_id, reason) super("Job #{job_id} failed: #{reason}") @job_id = job_id @reason = reason end |
Instance Attribute Details
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id.
70 71 72 |
# File 'lib/screenshotfreeapi/errors.rb', line 70 def job_id @job_id end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
70 71 72 |
# File 'lib/screenshotfreeapi/errors.rb', line 70 def reason @reason end |