Exception: Kaitai::Struct::ValidationNotEqualError

Inherits:
ValidationFailedError show all
Defined in:
lib/kaitai/struct/struct.rb

Overview

Signals validation failure: we required “actual” value to be equal to “expected”, but it turned out that it’s not.

Instance Method Summary collapse

Constructor Details

#initialize(expected, actual, io, src_path) ⇒ ValidationNotEqualError

Returns a new instance of ValidationNotEqualError.



603
604
605
606
607
608
609
# File 'lib/kaitai/struct/struct.rb', line 603

def initialize(expected, actual, io, src_path)
  expected_repr, actual_repr = Stream.inspect_values(expected, actual)
  super("not equal, expected #{expected_repr}, but got #{actual_repr}", io, src_path)

  @expected = expected
  @actual = actual
end