summaryrefslogtreecommitdiff
path: root/lib/net
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-29 07:54:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-29 07:54:38 +0000
commit919f456de88e9e1011db8f6e4e484e1b25e77af4 (patch)
treee367d6d1ba65d30139ae43891b52edfe71be8fca /lib/net
parent6a738f22656ffe247bcd02cf354c12a5370818ec (diff)
* exception message clean-up by Ian Macdonald <ian@caliban.org>.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r--lib/net/http.rb8
-rw-r--r--lib/net/https.rb2
-rw-r--r--lib/net/imap.rb2
-rw-r--r--lib/net/pop.rb4
-rw-r--r--lib/net/smtp.rb6
5 files changed, 11 insertions, 11 deletions
diff --git a/lib/net/http.rb b/lib/net/http.rb
index 7abde21670..0b7e20633b 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -121,7 +121,7 @@ module Net # :nodoc:
#
# def fetch( uri_str, limit = 10 )
# # You should choose better exception.
- # raise ArgumentError, 'http redirect too deep' if limit == 0
+ # raise ArgumentError, 'HTTP redirect too deep' if limit == 0
#
# response = Net::HTTP.get_response(URI.parse(uri_str))
# case response
@@ -480,7 +480,7 @@ module Net # :nodoc:
# Finishes HTTP session and closes TCP connection.
# Raises IOError if not started.
def finish
- raise IOError, 'HTTP session not started yet' unless started?
+ raise IOError, 'HTTP session not yet started' unless started?
do_finish
end
@@ -2058,11 +2058,11 @@ e @header.each_key(&block)
end
def stream_check
- raise IOError, 'try to read body out of block' if @socket.closed?
+ raise IOError, 'attempt to read body out of block' if @socket.closed?
end
def procdest(dest, block)
- raise ArgumentError, 'both of arg and block are given for HTTP method' \
+ raise ArgumentError, 'both arg and block given for HTTP method' \
if dest and block
if block
ReadAdapter.new(block)
diff --git a/lib/net/https.rb b/lib/net/https.rb
index 4200be3d62..a22084dc99 100644
--- a/lib/net/https.rb
+++ b/lib/net/https.rb
@@ -123,7 +123,7 @@ module Net
# a Net::HTTP object raises IOError.
def use_ssl=(flag)
flag = (flag ? true : false)
- raise IOError, "use_ssl value changed but session already started" \
+ raise IOError, "use_ssl value changed, but session already started" \
if started? and @use_ssl != flag
if flag and not @ssl_context
@ssl_context = OpenSSL::SSL::SSLContext.new
diff --git a/lib/net/imap.rb b/lib/net/imap.rb
index 85bef3c391..641d50e41f 100644
--- a/lib/net/imap.rb
+++ b/lib/net/imap.rb
@@ -859,7 +859,7 @@ module Net # :nodoc:
# firewall.
# Errno::ETIMEDOUT:: connection timed out (possibly due to packets
# being dropped by an intervening firewall).
- # Errno::NETUNREACH:: there is no route to that network.
+ # Errno::ENETUNREACH:: there is no route to that network.
# SocketError:: hostname not known or other socket error.
# Net::IMAP::ByeResponseError:: we connected to the host, but they
# immediately said goodbye to us.
diff --git a/lib/net/pop.rb b/lib/net/pop.rb
index 4a27bac0b8..21b58aa503 100644
--- a/lib/net/pop.rb
+++ b/lib/net/pop.rb
@@ -293,7 +293,7 @@ module Net
# This method must not be called while POP3 session is opened.
# This method raises POPAuthenticationError if authentication fails.
def auth_only(account, password)
- raise IOError, 'opening already opened POP session' if started?
+ raise IOError, 'opening previously opened POP session' if started?
start(account, password) {
;
}
@@ -449,7 +449,7 @@ module Net
# Finishes a POP3 session and closes TCP connection.
def finish
- raise IOError, 'POP session not started yet' unless started?
+ raise IOError, 'POP session not yet started' unless started?
do_finish
end
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index 123d31d205..9a5e84620f 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -373,7 +373,7 @@ module Net # :nodoc:
# Finishes the SMTP session and closes TCP connection.
# Raises IOError if not started.
def finish
- raise IOError, 'not started yet' unless started?
+ raise IOError, 'not yet started' unless started?
do_finish
end
@@ -474,7 +474,7 @@ module Net # :nodoc:
def send0( from_addr, to_addrs )
raise IOError, 'closed session' unless @socket
- raise ArgumentError, 'mail destination does not given' if to_addrs.empty?
+ raise ArgumentError, 'mail destination not given' if to_addrs.empty?
if $SAFE > 0
raise SecurityError, 'tainted from_addr' if from_addr.tainted?
to_addrs.each do |to|
@@ -501,7 +501,7 @@ module Net # :nodoc:
private
def check_auth_args( user, secret, authtype )
- raise ArgumentError, 'both of user and secret are required'\
+ raise ArgumentError, 'both user and secret are required'\
unless user and secret
auth_method = "auth_#{authtype || 'cram_md5'}"
raise ArgumentError, "wrong auth type #{authtype}"\