Exception: LifecycleVM::OpBase::InvalidAttr

Inherits:
Error
  • Object
show all
Defined in:
lib/lifecycle_vm/op_base.rb

Overview

Raised if an op attempts to read or write to a memory slot that does not exist, or if an op attempts to write to any slot in LifecycleVM::Memory::PROTECTED.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(op_class, attribute) ⇒ InvalidAttr

Returns a new instance of InvalidAttr.



35
36
37
38
39
# File 'lib/lifecycle_vm/op_base.rb', line 35

def initialize(op_class, attribute)
  @op_class = op_class
  @attribute = attribute
  super("Invalid attribute #{attribute} access by #{op_class.name}")
end

Instance Attribute Details

#attributeObject (readonly)

Returns the value of attribute attribute.



33
34
35
# File 'lib/lifecycle_vm/op_base.rb', line 33

def attribute
  @attribute
end

#op_classObject (readonly)

Returns the value of attribute op_class.



33
34
35
# File 'lib/lifecycle_vm/op_base.rb', line 33

def op_class
  @op_class
end