diff options
| author | Jack Nagel | 2014-09-18 20:32:50 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-09-18 20:32:50 -0500 | 
| commit | 8b1bd09d9b2a0a98ff5401edee8c43aa4e49449a (patch) | |
| tree | b5e2b2515dda8f8487226ca33cd88cc5d9acec75 /Library/Homebrew/exceptions.rb | |
| parent | 90af638d3a7ad2d8daabb783a6679ab613bc3693 (diff) | |
| download | homebrew-8b1bd09d9b2a0a98ff5401edee8c43aa4e49449a.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 | 
