Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Where possible, don't rescue Exception

This allows single-threaded applications to set a Timeout and be
assured that no one will intercept it.
  • Loading branch information...
commit 09fef22b4a84886f30c2089e20b04f3cabc3214c 1 parent 3f89a8d
@gdb authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/bunny/session.rb
  2. +1 −1  lib/bunny/transport.rb
View
2  lib/bunny/session.rb
@@ -263,7 +263,7 @@ def handle_frame(ch_number, method)
@event_loop = nil
@transport.close
- rescue Exception => e
+ rescue StandardError => e
puts e.class.name
puts e.message
puts e.backtrace
View
2  lib/bunny/transport.rb
@@ -175,7 +175,7 @@ def initialize_socket
@socket.post_connection_check(host) if @verify_ssl
@socket
end
- rescue Exception => e
+ rescue StandardError, ConnectionTimeout => e
@status = :not_connected
raise Bunny::TCPConnectionFailed.new(e, self.hostname, self.port)
end
Please sign in to comment.
Something went wrong with that request. Please try again.