Exception: LIBUSB::Error

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/libusb/constants.rb

Overview

Base class of libusb errors

Direct Known Subclasses

RemainingReferencesError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, transferred = nil) ⇒ Error

Returns a new instance of Error.



50
51
52
53
# File 'lib/libusb/constants.rb', line 50

def initialize(msg=nil, transferred=nil)
  super(msg)
  @transferred = transferred
end

Instance Attribute Details

#transferredFixnum, String (readonly)

The data already transferred before the exception was raised

Returns:

  • (Fixnum)

    Number of bytes sent for an outgoing transfer

  • (String)

    Received data for an ingoing transfer



48
49
50
# File 'lib/libusb/constants.rb', line 48

def transferred
  @transferred
end