Exception: S7n::DataLengthError

Inherits:
ApplicationError show all
Defined in:
lib/s7n/exception.rb

Overview

データ長が不正であることを表現する例外クラス。

Instance Method Summary collapse

Constructor Details

#initialize(actual, needed) ⇒ DataLengthError

Returns a new instance of DataLengthError.



84
85
86
87
# File 'lib/s7n/exception.rb', line 84

def initialize(actual, needed)
  @actual = actual
  @needed = needed
end

Instance Method Details

#to_sObject



89
90
91
# File 'lib/s7n/exception.rb', line 89

def to_s
  return _("Invalid data length: actual=<%s> needed=<%s>") % [@actual, @needed]
end