Skip to content

Commit 17c911f

Browse files
authored
Merge pull request #61 from nobu/undoc-internals
[DOC] Get rid of a RDoc bug
2 parents 1aaeb77 + a7bded0 commit 17c911f

File tree

2 files changed

+255
-249
lines changed

2 files changed

+255
-249
lines changed

lib/net/http/exceptions.rb

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,34 @@
11
# frozen_string_literal: false
2-
# Net::HTTP exception class.
3-
# You cannot use Net::HTTPExceptions directly; instead, you must use
4-
# its subclasses.
5-
module Net::HTTPExceptions
6-
def initialize(msg, res) #:nodoc:
7-
super msg
8-
@response = res
2+
module Net
3+
# Net::HTTP exception class.
4+
# You cannot use Net::HTTPExceptions directly; instead, you must use
5+
# its subclasses.
6+
module HTTPExceptions
7+
def initialize(msg, res) #:nodoc:
8+
super msg
9+
@response = res
10+
end
11+
attr_reader :response
12+
alias data response #:nodoc: obsolete
913
end
10-
attr_reader :response
11-
alias data response #:nodoc: obsolete
12-
end
13-
class Net::HTTPError < Net::ProtocolError
14-
include Net::HTTPExceptions
15-
end
16-
class Net::HTTPRetriableError < Net::ProtoRetriableError
17-
include Net::HTTPExceptions
18-
end
19-
class Net::HTTPClientException < Net::ProtoServerError
20-
include Net::HTTPExceptions
21-
end
2214

23-
# for compatibility
24-
Net::HTTPServerException = Net::HTTPClientException # :nodoc:
25-
# We cannot use the name "HTTPServerError", it is the name of the response.
15+
class HTTPError < ProtocolError
16+
include HTTPExceptions
17+
end
2618

27-
class Net::HTTPFatalError < Net::ProtoFatalError
28-
include Net::HTTPExceptions
29-
end
19+
class HTTPRetriableError < ProtoRetriableError
20+
include HTTPExceptions
21+
end
3022

31-
module Net
23+
class HTTPClientException < ProtoServerError
24+
include HTTPExceptions
25+
end
26+
27+
class HTTPFatalError < ProtoFatalError
28+
include HTTPExceptions
29+
end
30+
31+
# We cannot use the name "HTTPServerError", it is the name of the response.
32+
HTTPServerException = HTTPClientException # :nodoc:
3233
deprecate_constant(:HTTPServerException)
3334
end

0 commit comments

Comments
 (0)