Exception: Modbus::ModbusError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg) ⇒ ModbusError

Returns a new instance of ModbusError.



12
13
14
15
# File 'lib/modbus/exceptions.rb', line 12

def initialize(msg)
  super
  @code = self.class::CODE
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



10
11
12
# File 'lib/modbus/exceptions.rb', line 10

def code
  @code
end