Exception: ScreenshotFreeAPI::ScreenshotFreeAPIError

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

Overview

Base error class for all ScreenshotFreeAPI errors that originate from HTTP responses.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_code, error_code, message, details = nil) ⇒ ScreenshotFreeAPIError

Returns a new instance of ScreenshotFreeAPIError.



8
9
10
11
12
13
# File 'lib/screenshotfreeapi/errors.rb', line 8

def initialize(status_code, error_code, message, details = nil)
  super(message)
  @status_code  = status_code
  @error_code   = error_code
  @details      = details
end

Instance Attribute Details

#detailsObject (readonly)

Returns the value of attribute details.



6
7
8
# File 'lib/screenshotfreeapi/errors.rb', line 6

def details
  @details
end

#error_codeObject (readonly)

Returns the value of attribute error_code.



6
7
8
# File 'lib/screenshotfreeapi/errors.rb', line 6

def error_code
  @error_code
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



6
7
8
# File 'lib/screenshotfreeapi/errors.rb', line 6

def status_code
  @status_code
end