diff options
| author | Jack Nagel | 2014-02-08 16:04:53 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-02-08 16:04:53 -0500 |
| commit | 013482bf941719a9e24d33a058e2472d4599b98f (patch) | |
| tree | d93f8423ea27d52820b7140bcd6017990bde70bf /Library/Homebrew/utils.rb | |
| parent | 0a7767b247f6289f0dbd2b6601dfc4ce320ce585 (diff) | |
| download | homebrew-013482bf941719a9e24d33a058e2472d4599b98f.tar.bz2 | |
Raise only GitHub::Error from GitHub.open
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 2f5bf1b0d..73495e31c 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -266,13 +266,13 @@ module GitHub extend self end rescue OpenURI::HTTPError => e if e.io.meta['x-ratelimit-remaining'].to_i <= 0 - raise <<-EOS.undent + raise Error, <<-EOS.undent GitHub #{Utils::JSON.load(e.io.read)['message']} You may want to create an API token: https://github.com/settings/applications and then set HOMEBREW_GITHUB_API_TOKEN. EOS else - raise e + raise Error, e.message end rescue SocketError, OpenSSL::SSL::SSLError => e raise Error, "Failed to connect to: #{url}\n#{e.message}" |
