Exception: Kaitai::Struct::Stream::UnexpectedDataError
- Inherits:
-
Exception
- Object
- Exception
- Kaitai::Struct::Stream::UnexpectedDataError
- Defined in:
- lib/kaitai/struct/struct.rb
Overview
Unused since Kaitai Struct Compiler v0.9+ - compatibility with older versions.
Exception class for an error that occurs when some fixed content was expected to appear, but actual data read was different.
Instance Method Summary collapse
-
#initialize(actual, expected) ⇒ UnexpectedDataError
constructor
A new instance of UnexpectedDataError.
Constructor Details
#initialize(actual, expected) ⇒ UnexpectedDataError
Returns a new instance of UnexpectedDataError.
85 86 87 88 89 |
# File 'lib/kaitai/struct/struct.rb', line 85 def initialize(actual, expected) super("Unexpected fixed contents: got #{Stream.format_hex(actual)}, was waiting for #{Stream.format_hex(expected)}") @actual = actual @expected = expected end |