Skip to content
Snippets Groups Projects
Commit 1dd924b9 authored by Jack Nagel's avatar Jack Nagel
Browse files

gist-logs: remove unnecessary exception class

parent c0c5298a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment