Exception: Zip::EntryNameError

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

Overview

Error raised when an entry name is invalid.

Instance Method Summary collapse

Constructor Details

#initialize(name = nil) ⇒ EntryNameError

Create a new EntryNameError with the specified name.



79
80
81
82
# File 'lib/zip/errors.rb', line 79

def initialize(name = nil)
  super()
  @name = name
end

Instance Method Details

#messageObject

The message returned by this error.



85
86
87
88
89
90
91
# File 'lib/zip/errors.rb', line 85

def message
  if @name.nil?
    'Illegal entry name. Names must have fewer than 65,536 characters.'
  else
    "Illegal entry name '#{@name}'. Names must not start with '/'."
  end
end