diff options
Diffstat (limited to 'Library/Homebrew/exceptions.rb')
| -rw-r--r-- | Library/Homebrew/exceptions.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/exceptions.rb b/Library/Homebrew/exceptions.rb index 72c62dcc7..e77c0573a 100644 --- a/Library/Homebrew/exceptions.rb +++ b/Library/Homebrew/exceptions.rb @@ -112,3 +112,17 @@ class BuildError < Homebrew::InstallationError @command == './configure' end end + +class DownloadError < RuntimeError + attr :command + attr :args + attr :exit_status + + 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 +end |
