Exception: SonyCameraRemoteAPI::APIExecutionError
- Inherits:
-
StandardError
- Object
- StandardError
- SonyCameraRemoteAPI::APIExecutionError
- Defined in:
- lib/sony_camera_remote_api/error.rb
Overview
API returned error response
Instance Attribute Summary collapse
-
#err_code ⇒ Object
readonly
Returns the value of attribute err_code.
-
#err_msg ⇒ Object
readonly
Returns the value of attribute err_msg.
-
#method ⇒ Object
readonly
Returns the value of attribute method.
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(method, request, response) ⇒ APIExecutionError
constructor
A new instance of APIExecutionError.
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_code ⇒ Object (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_msg ⇒ Object (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 |
#method ⇒ Object (readonly)
Returns the value of attribute method.
33 34 35 |
# File 'lib/sony_camera_remote_api/error.rb', line 33 def method @method end |
#request ⇒ Object (readonly)
Returns the value of attribute request.
33 34 35 |
# File 'lib/sony_camera_remote_api/error.rb', line 33 def request @request end |