diff options
| author | Jack Nagel | 2014-02-08 16:04:53 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-02-08 16:04:53 -0500 | 
| commit | 2e3871c076c3ef5d4a5ed83b793f282d5f507a27 (patch) | |
| tree | 01fe371b13f8f1584b630eea2235f0fbcf06a567 /Library/Homebrew/utils.rb | |
| parent | 4d6df3e3bca5147f49deb530d930b2f40b032cd1 (diff) | |
| download | brew-2e3871c076c3ef5d4a5ed83b793f282d5f507a27.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}"  | 
