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.



771
772
773
774
775
776
# File 'lib/kaitai/struct/struct.rb', line 771

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