-
-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Also wrap Errno::ETIMEDOUT. #212
Conversation
Got it today in : Operation timed out whois (2.7.0) lib/whois/server/adapters/base.rb:195:in `read'
And while we're add it, you could add Errno::EPIPE too :)
|
And I think I'd suggest just wrapping "SystemCallError" (http://www.ruby-doc.org/core-2.0/Errno.html). |
You mean replacing all the |
Correct. Do you have any objection on this proposal? |
@@ -22,9 +22,7 @@ class SocketHandler | |||
# Array of connection errors to rescue | |||
# and wrap into a {Whois::ConnectionError} | |||
RESCUABLE_CONNECTION_ERRORS = [ | |||
Errno::ECONNRESET, | |||
Errno::EHOSTUNREACH, | |||
Errno::ECONNREFUSED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would leave these classes in the spec, to make sure we're not breaking BC with previous versions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I was wondering about that.
Nope, Just did it :-) |
Hum, travis says I did something wrong, letme check… |
It looks like there is an issue with the spec for |
SystemCallError is a special kind of exception, you should not call it by yourself : 1.9.3 (main):0 > SystemCallError.new(1) => #<Errno::EPERM: Operation not permitted> 1.9.3 (main):0 > SystemCallError.new("foo", 1) => #<Errno::EPERM: Operation not permitted - foo> 1.9.3 (main):0 > SystemCallError.new("foo") => #<SystemCallError: unknown error - foo>
As a side note, there are some missing requires somewhere in the specs, I couldn't run:
had to do:
|
I noticed it a couple of times in the specs. This is because of
at the top of the spec file. |
Got it today in :
Operation timed out
whois (2.7.0) lib/whois/server/adapters/base.rb:195:in `read'