Exception: Zip::EntryNumberMismatchError

Inherits:
Error
  • Object
show all
Defined in:
lib/zip/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(size, size_in_bytes) ⇒ EntryNumberMismatchError

Create a new EntryNumberMismatchError with the specified size and size in bytes.



114
115
116
117
118
# File 'lib/zip/errors.rb', line 114

def initialize(size, size_in_bytes)
  super()
  @size = size
  @size_in_bytes = size_in_bytes
end

Instance Method Details

#messageObject

The message returned by this error.



121
122
123
124
125
# File 'lib/zip/errors.rb', line 121

def message
  "Zip consistency problem: an impossibly high number of entries (#{@size}) " \
    'is declared in this file, compared to the size of the central directory ' \
    "(#{@size_in_bytes} bytes)."
end