diff options
| author | Jack Nagel | 2014-09-07 16:18:35 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-09-07 16:19:20 -0500 |
| commit | 43f5163ee62de0d1a5a8f6f4092d7602632e5650 (patch) | |
| tree | 813c5696834ba82ad99700426c5dee0c57d9ba17 /Library | |
| parent | 64f07b8ffef70954c87b398d9cfd7163112d95f1 (diff) | |
| download | homebrew-43f5163ee62de0d1a5a8f6f4092d7602632e5650.tar.bz2 | |
gist-logs: remove unnecessary exception class
Diffstat (limited to 'Library')
| -rwxr-xr-x | Library/Contributions/cmd/brew-gist-logs.rb | 8 |
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 |
