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

Returns a new instance of EntryNameError.



66
67
68
69
# File 'lib/zip/errors.rb', line 66

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

Instance Method Details

#messageObject



71
72
73
74
75
76
77
# File 'lib/zip/errors.rb', line 71

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