diff options
| author | Jack Nagel | 2014-09-18 20:32:50 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-09-18 20:32:50 -0500 | 
| commit | 56dd575f9603a75015fbdd4a7d7daea0c34a2cb9 (patch) | |
| tree | 342b61b5f2fb544a62686d5f95712005efb705ba /Library/Homebrew/exceptions.rb | |
| parent | 7a4e2fe24dd29d5f8780d494975509d3de39eed9 (diff) | |
| download | brew-56dd575f9603a75015fbdd4a7d7daea0c34a2cb9.tar.bz2 | |
Pass command and arg list into ErrorDuringExecution constructor
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index da48d60ca..100effdbd 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -214,7 +214,12 @@ end  class CurlDownloadStrategyError < RuntimeError; end  # raised by safe_system in utils.rb -class ErrorDuringExecution < RuntimeError; end +class ErrorDuringExecution < RuntimeError +  def initialize(cmd, args=[]) +    args = args.map { |a| a.to_s.gsub " ", "\\ " }.join(" ") +    super "Failure while executing: #{cmd} #{args}" +  end +end  # raised by Pathname#verify_checksum when "expected" is nil or empty  class ChecksumMissingError < ArgumentError; end  | 
