Exception: Kaitai::Struct::ValidationLessThanError

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(min, actual, io, src_path) ⇒ ValidationLessThanError

Returns a new instance of ValidationLessThanError.



616
617
618
619
620
621
# File 'lib/kaitai/struct/struct.rb', line 616

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