Exception: ScreenshotFreeAPI::JobTimeoutError
- Inherits:
-
StandardError
- Object
- StandardError
- ScreenshotFreeAPI::JobTimeoutError
- Defined in:
- lib/screenshotfreeapi/errors.rb
Overview
Raised when a job does not complete within the configured polling timeout.
Instance Attribute Summary collapse
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
-
#timeout_seconds ⇒ Object
readonly
Returns the value of attribute timeout_seconds.
Instance Method Summary collapse
-
#initialize(job_id, timeout_seconds) ⇒ JobTimeoutError
constructor
A new instance of JobTimeoutError.
Constructor Details
#initialize(job_id, timeout_seconds) ⇒ JobTimeoutError
Returns a new instance of JobTimeoutError.
83 84 85 86 87 |
# File 'lib/screenshotfreeapi/errors.rb', line 83 def initialize(job_id, timeout_seconds) super("Job #{job_id} did not complete within #{timeout_seconds}s") @job_id = job_id @timeout_seconds = timeout_seconds end |
Instance Attribute Details
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id.
81 82 83 |
# File 'lib/screenshotfreeapi/errors.rb', line 81 def job_id @job_id end |
#timeout_seconds ⇒ Object (readonly)
Returns the value of attribute timeout_seconds.
81 82 83 |
# File 'lib/screenshotfreeapi/errors.rb', line 81 def timeout_seconds @timeout_seconds end |