Exception: SonyCameraRemoteAPI::APIExecutionError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/sony_camera_remote_api/error.rb

Overview

API returned error response

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method, request, response) ⇒ APIExecutionError

Returns a new instance of APIExecutionError.



34
35
36
37
38
39
# File 'lib/sony_camera_remote_api/error.rb', line 34

def initialize(method, request, response)
  @method = method
  @request = request
  @err_code = response['error'][0]
  @err_msg = response['error'][1]
end

Instance Attribute Details

#err_codeObject (readonly)

Returns the value of attribute err_code.



33
34
35
# File 'lib/sony_camera_remote_api/error.rb', line 33

def err_code
  @err_code
end

#err_msgObject (readonly)

Returns the value of attribute err_msg.



33
34
35
# File 'lib/sony_camera_remote_api/error.rb', line 33

def err_msg
  @err_msg
end

#methodObject (readonly)

Returns the value of attribute method.



33
34
35
# File 'lib/sony_camera_remote_api/error.rb', line 33

def method
  @method
end

#requestObject (readonly)

Returns the value of attribute request.



33
34
35
# File 'lib/sony_camera_remote_api/error.rb', line 33

def request
  @request
end