Skip to content

Commit

Permalink
Reword the exceptions so they don't specify "file".
Browse files Browse the repository at this point in the history
Containers can be directories now, too.
  • Loading branch information
hainesr committed Jan 31, 2015
1 parent 9bf86f9 commit 343f0ed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/zip-container/exceptions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ class MalformedContainerError < RuntimeError
# new(reason_list)
#
# Create a new MalformedContainerError with an optional reason or list of
# reasons for why the Container file is malformed.
# reasons for why the Container is malformed.
def initialize(reason = nil)
if reason.nil? || reason.empty?
super("Malformed Container File.")
super("Malformed Container.")
elsif reason.is_a?(Array)
reasons = reason.map { |r| " * #{r}\n" }
super("Malformed Container File:\n#{reasons}")
super("Malformed Container:\n#{reasons}")
else
super("Malformed Container File: #{reason}")
super("Malformed Container: #{reason}")
end
end
end
Expand All @@ -74,7 +74,7 @@ class ReservedNameClashError < RuntimeError
#
# Create a new ReservedNameClashError with the name of the clash supplied.
def initialize(name)
super("'#{name}' is reserved for internal use in this ZipContainer file.")
super("'#{name}' is reserved for internal use in this ZipContainer.")
end
end

Expand Down

0 comments on commit 343f0ed

Please sign in to comment.