Exception: Utils::Inreplace::Error Private

Inherits:
RuntimeError
  • Object
show all
Defined in:
brew/Library/Homebrew/utils/inreplace.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Error during replacement.

Instance Method Summary collapse

Constructor Details

#initialize(errors) ⇒ Error

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Error.



10
11
12
13
14
15
# File 'brew/Library/Homebrew/utils/inreplace.rb', line 10

def initialize(errors)
  formatted_errors = errors.reduce(+"inreplace failed\n") do |s, (path, errs)|
    s << "#{path}:\n" << errs.map { |e| "  #{e}\n" }.join
  end
  super formatted_errors.freeze
end