aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/exceptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
-rw-r--r--Library/Homebrew/exceptions.rb7
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