aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-09-07 16:18:35 -0500
committerJack Nagel2014-09-07 16:19:20 -0500
commit1dd924b9bd843a20f232272a2958e2c61fbc1a3d (patch)
treeb3c657f4ca486f0d3a40dfe496b02ee992216bb2 /Library
parentc0c5298ae5cf12f4a058732072d55ba3a6a02d77 (diff)
downloadbrew-1dd924b9bd843a20f232272a2958e2c61fbc1a3d.tar.bz2
gist-logs: remove unnecessary exception class
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-gist-logs.rb8
1 files changed, 1 insertions, 7 deletions
diff --git a/Library/Contributions/cmd/brew-gist-logs.rb b/Library/Contributions/cmd/brew-gist-logs.rb
index d5f6bb3a6..66fcd30f9 100755
--- a/Library/Contributions/cmd/brew-gist-logs.rb
+++ b/Library/Contributions/cmd/brew-gist-logs.rb
@@ -79,7 +79,7 @@ def post path, data
end
request.body = Utils::JSON.dump(data)
response = http.request(request)
- raise HTTP_Error, response if response.code != '201'
+ raise "HTTP #{response.code} #{response.message}" if response.code != "201"
if !response.body.respond_to?(:force_encoding)
body = response.body
@@ -92,12 +92,6 @@ def post path, data
Utils::JSON.load(body)
end
-class HTTP_Error < RuntimeError
- def initialize response
- super "HTTP #{response.code} #{response.message}"
- end
-end
-
def usage
puts "usage: brew gist-logs [options] <formula>"
puts