Exception: Zip::EntryExistsError

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

Overview

Error raised when trying to add an entry to an archive where the entry name already exists.

Instance Method Summary collapse

Constructor Details

#initialize(source, name) ⇒ EntryExistsError

Create a new EntryExistsError with the specified source and name.



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

def initialize(source, name)
  super()
  @source = source
  @name = name
end

Instance Method Details

#messageObject

The message returned by this error.



71
72
73
# File 'lib/zip/errors.rb', line 71

def message
  "'#{@source}' failed. Entry #{@name} already exists."
end