Exception: ScreenshotFreeAPI::JobFailedError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/screenshotfreeapi/errors.rb

Overview

Raised when polling a job that has transitioned to the FAILED state.

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject (readonly)

Returns the value of attribute job_id.



70
71
72
# File 'lib/screenshotfreeapi/errors.rb', line 70

def job_id
  @job_id
end

#reasonObject (readonly)

Returns the value of attribute reason.



70
71
72
# File 'lib/screenshotfreeapi/errors.rb', line 70

def reason
  @reason
end