aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-02-08 16:04:53 -0500
committerJack Nagel2014-02-08 16:04:53 -0500
commitee893fdd886552631ec2e763180b91402e1e858f (patch)
tree92875207613bdd32c90036586149088a6728500f /Library
parent2e3871c076c3ef5d4a5ed83b793f282d5f507a27 (diff)
downloadbrew-ee893fdd886552631ec2e763180b91402e1e858f.tar.bz2
Preserve original backtrace when raising GitHub::Error
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/utils.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb
index 73495e31c..b00413153 100644
--- a/Library/Homebrew/utils.rb
+++ b/Library/Homebrew/utils.rb
@@ -266,18 +266,18 @@ module GitHub extend self
end
rescue OpenURI::HTTPError => e
if e.io.meta['x-ratelimit-remaining'].to_i <= 0
- raise Error, <<-EOS.undent
+ raise Error, <<-EOS.undent, e.backtrace
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 Error, e.message
+ raise Error, e.message, e.backtrace
end
rescue SocketError, OpenSSL::SSL::SSLError => e
- raise Error, "Failed to connect to: #{url}\n#{e.message}"
+ raise Error, "Failed to connect to: #{url}\n#{e.message}", e.backtrace
rescue Utils::JSON::Error => e
- raise Error, "Failed to parse JSON response\n#{e.message}"
+ raise Error, "Failed to parse JSON response\n#{e.message}", e.backtrace
end
def issues_matching(query)