Exception: Zip::DecompressionError

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

Overview

Error raised if there is a problem while decompressing an archive entry.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(zlib_error) ⇒ DecompressionError

Create a new DecompressionError with the specified underlying Zlib error.



33
34
35
36
# File 'lib/zip/errors.rb', line 33

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

Instance Attribute Details

#zlib_errorObject (readonly)

The error from the underlying Zlib library that caused this error.



29
30
31
# File 'lib/zip/errors.rb', line 29

def zlib_error
  @zlib_error
end

Instance Method Details

#messageObject

The message returned by this error.



39
40
41
# File 'lib/zip/errors.rb', line 39

def message
  "Zlib error ('#{@zlib_error.message}') while inflating."
end