diff options
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 17 | 
1 files changed, 4 insertions, 13 deletions
| diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index b9696f623..a45a5de77 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -251,22 +251,13 @@ class ChecksumMismatchError < RuntimeError  end  class ResourceMissingError < ArgumentError -  def initialize formula, resource -    @formula = formula -    @resource = resource -  end - -  def to_s -    "Formula #{@formula} does not define resource \"#{@resource}\"." +  def initialize(formula, resource) +    super "#{formula} does not define resource #{resource.inspect}"    end  end  class DuplicateResourceError < ArgumentError -  def initialize resource -    @resource = resource -  end - -  def to_s -    "Resource \"#{@resource}\" defined more than once." +  def initialize(resource) +    super "Resource #{resource.inspect} is defined more than once"    end  end | 
