Exception: Kaitai::Struct::Stream::UnexpectedDataError Deprecated

Inherits:
Exception
  • Object
show all
Defined in:
lib/kaitai/struct/struct.rb

Overview

Deprecated.

Unused since Kaitai Struct compiler 0.9. It is only available for backward compatibility and will be removed in the future. KSC 0.9 and later versions use ValidationNotEqualError instead.

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

Constructor Details

#initialize(actual, expected) ⇒ UnexpectedDataError

Returns a new instance of UnexpectedDataError.



87
88
89
90
91
92
# File 'lib/kaitai/struct/struct.rb', line 87

def initialize(actual, expected)
  super("Unexpected fixed contents: got #{Internal.format_hex(actual)}, " \
        "was waiting for #{Internal.format_hex(expected)}")
  @actual = actual
  @expected = expected
end