From 6bd47cf0f96447e5ee0925eea34e406bdaed7ffa Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 19 Sep 2011 23:29:07 +0100 Subject: Only try mirrors for CurlDownloadStrategies Also adjust output text slightly for prettiness. A possibly useful side effect here is safe_system has a defined Exception (subclassing RuntimeError) now. --- Library/Homebrew/exceptions.rb | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'Library/Homebrew/exceptions.rb') diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index e77c0573a..cd5103963 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -113,16 +113,10 @@ class BuildError < Homebrew::InstallationError end end -class DownloadError < RuntimeError - attr :command - attr :args - attr :exit_status +# raised in CurlDownloadStrategy.fetch +class CurlDownloadStrategyError < RuntimeError +end - def initialize cmd, args, status - @command = cmd - @args = args - args.map!{ |arg| arg.to_s.gsub " ", "\\ " } - super "#{cmd} #{args.join ' '}\nDownloader failed with exit status #{status}" - @exit_status = status - end +# raised by safe_system in utils.rb +class ErrorDuringExecution < RuntimeError end -- cgit v1.2.3