RUBY-429 rescue granularity

This commit is contained in:
Tyler Brock 2012-04-04 20:12:36 -04:00
parent b2a1841f9c
commit 58f0ee8fff

View File

@ -65,9 +65,10 @@ module Mongo
@socket.readpartial(maxlen, buffer)
rescue EOFError
return ConnectionError
rescue Errno::ECONNRESET, Errno::EPIPE, Errno::EINVAL, Errno::EBADF, Errno::EINTR,
Errno::EIO, Errno::ENOTCONN, SocketError
rescue Errno::ECONNRESET, Errno::ENOTCONN, Errno::EBADF
raise ConnectionFailure
rescue Errno::EINTR, Errno::EIO, Errno::EPIPE
raise OperationFailure
end
else
raise OperationTimeout