Exception: Zip::StreamingError

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

Overview

Error raised if there is not enough metadata for the entry to be streamed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(entry) ⇒ StreamingError

Create a new StreamingError with the specified entry.



127
128
129
130
# File 'lib/zip/errors.rb', line 127

def initialize(entry)
  super()
  @entry = entry
end

Instance Attribute Details

#entryObject (readonly)

The entry that has caused this error.



124
125
126
# File 'lib/zip/errors.rb', line 124

def entry
  @entry
end

Instance Method Details

#messageObject

The message returned by this error.



133
134
135
136
137
# File 'lib/zip/errors.rb', line 133

def message
  "The local header of this entry ('#{@entry.name}') does not contain " \
    'the correct metadata for `Zip::InputStream` to be able to ' \
    'uncompress it. Please use `Zip::File` instead of `Zip::InputStream`.'
end