Exception: Msp430Bsl::Exceptions::Response::WrongDataSize

Inherits:
StandardError
  • Object
show all
Defined in:
lib/msp430_bsl/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(data, size, min: false) ⇒ WrongDataSize

Returns a new instance of WrongDataSize.



44
45
46
47
# File 'lib/msp430_bsl/exceptions.rb', line 44

def initialize(data, size, min: false)
  message = "payload with a size of '#{data.size}' doesn't satisfy the required #{min ? 'min' : ''}size of '#{size}'"
  super(message)
end