Exception: Adept::LowLevel::DeviceError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/adept/low_level/device_error.rb

Overview

Wrapper for Digilent Device Manager errors, which allows errors raised from the low-level SDK to be handled like ruby exceptions.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, short_name, code = nil) ⇒ DeviceError

Returns a new instance of DeviceError.



14
15
16
17
18
# File 'lib/adept/low_level/device_error.rb', line 14

def initialize(message, short_name, code=nil)
  @short_name = short_name
  @code = code
  super(message)
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



12
13
14
# File 'lib/adept/low_level/device_error.rb', line 12

def code
  @code
end

#short_nameObject

Returns the value of attribute short_name.



11
12
13
# File 'lib/adept/low_level/device_error.rb', line 11

def short_name
  @short_name
end