diff options
| author | Max Howell | 2011-09-19 23:29:07 +0100 |
|---|---|---|
| committer | Max Howell | 2011-09-19 23:30:10 +0100 |
| commit | 6bd47cf0f96447e5ee0925eea34e406bdaed7ffa (patch) | |
| tree | 46934d2c6eeb62ebdce6daf303b517c809c3e731 /Library/Homebrew/exceptions.rb | |
| parent | 1dc0775a15302830725d45e9912f61e0fdfb5596 (diff) | |
| download | brew-6bd47cf0f96447e5ee0925eea34e406bdaed7ffa.tar.bz2 | |
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.
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 16 |
1 files changed, 5 insertions, 11 deletions
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 |
