Exception: Nxo::Error::AddressMismatchError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Nxo::Error::AddressMismatchError
- Defined in:
- lib/nxo/error.rb
Instance Attribute Summary collapse
-
#actual ⇒ Object
readonly
Returns the value of attribute actual.
-
#expected ⇒ Object
readonly
Returns the value of attribute expected.
-
#segment ⇒ Object
readonly
Returns the value of attribute segment.
Instance Method Summary collapse
-
#initialize(segment, expected, actual) ⇒ AddressMismatchError
constructor
A new instance of AddressMismatchError.
Constructor Details
#initialize(segment, expected, actual) ⇒ AddressMismatchError
Returns a new instance of AddressMismatchError.
33 34 35 36 37 38 |
# File 'lib/nxo/error.rb', line 33 def initialize(segment, expected, actual) super("Attempted to place segment \"#{segment}\" at 0x#{actual.to_s(16)}, but headers puts it at 0x#{expected.to_s(16)}") @segment = segment @expected = expected @actual = actual end |
Instance Attribute Details
#actual ⇒ Object (readonly)
Returns the value of attribute actual.
40 41 42 |
# File 'lib/nxo/error.rb', line 40 def actual @actual end |
#expected ⇒ Object (readonly)
Returns the value of attribute expected.
40 41 42 |
# File 'lib/nxo/error.rb', line 40 def expected @expected end |
#segment ⇒ Object (readonly)
Returns the value of attribute segment.
40 41 42 |
# File 'lib/nxo/error.rb', line 40 def segment @segment end |