mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add Net::HTTPClientException [Bug #14688]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
685fdbe64c
commit
8e37f17671
3 changed files with 14 additions and 1 deletions
5
NEWS
5
NEWS
|
@ -159,6 +159,11 @@ with all sufficient information, see the ChangeLog file or Redmine
|
|||
* Add Net::BufferedIO#write_timeout, Net::BufferedIO#write_timeout=,
|
||||
Net::HTTP#write_timeout, and Net::HTTP#write_timeout=. [Feature #13396]
|
||||
|
||||
* New constant:
|
||||
|
||||
* Add Net::HTTPClientException to deprecate Net::HTTPServerException,
|
||||
whose name is misleading. [Bug #14688]
|
||||
|
||||
* REXML
|
||||
|
||||
* Improved some XPath implementations:
|
||||
|
|
|
@ -20,7 +20,15 @@ class Net::HTTPServerException < Net::ProtoServerError
|
|||
# We cannot use the name "HTTPServerError", it is the name of the response.
|
||||
include Net::HTTPExceptions
|
||||
end
|
||||
|
||||
# for compatibility
|
||||
Net::HTTPClientException = Net::HTTPServerException
|
||||
|
||||
class Net::HTTPFatalError < Net::ProtoFatalError
|
||||
include Net::HTTPExceptions
|
||||
end
|
||||
|
||||
module Net
|
||||
deprecate_constant(:HTTPServerException)
|
||||
deprecate_constant(:ProtoServerError)
|
||||
end
|
||||
|
|
|
@ -422,7 +422,7 @@ EOS
|
|||
|
||||
res = Net::HTTPResponse.read_new(io)
|
||||
assert_equal(nil, res.message)
|
||||
assert_raise Net::HTTPServerException do
|
||||
assert_raise Net::HTTPClientException do
|
||||
res.error!
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue