Exception: MTP::CommandError
- Inherits:
-
DeviceError
- Object
- StandardError
- MTPError
- DeviceError
- MTP::CommandError
- Defined in:
- lib/mtp.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Attributes inherited from DeviceError
Instance Method Summary collapse
-
#initialize(device, request, response, message = nil) ⇒ CommandError
constructor
A new instance of CommandError.
Constructor Details
#initialize(device, request, response, message = nil) ⇒ CommandError
Returns a new instance of CommandError.
70 71 72 73 74 |
# File 'lib/mtp.rb', line 70 def initialize(device, request, response, = nil) = sprintf("0x%04x:%s => 0x%04x:%s", request.code, request.code.name, response.code, response.code.name) if .nil? super(device, ) @request, @response = request, response end |