Exception: Kaitai::Struct::ValidationGreaterThanError

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(max, actual, io, src_path) ⇒ ValidationGreaterThanError

Returns a new instance of ValidationGreaterThanError.



628
629
630
631
632
633
# File 'lib/kaitai/struct/struct.rb', line 628

def initialize(max, actual, io, src_path)
  max_repr, actual_repr = Stream.inspect_values(max, actual)
  super("not in range, max #{max_repr}, but got #{actual_repr}", io, src_path)
  @max = max
  @actual = actual
end