From 2c204614bd8d2f7c8304f07c09e17a53c9c73b5b Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 16 Aug 2006 23:18:17 +0000 Subject: Some error handling cleanup --- lib/rbot/ircbot.rb | 2 +- lib/rbot/ircsocket.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb index 3c2de268..432b61c4 100644 --- a/lib/rbot/ircbot.rb +++ b/lib/rbot/ircbot.rb @@ -606,7 +606,7 @@ class IrcBot rescue SystemExit log_session_end exit 0 - rescue Errno::ETIMEDOUT, TimeoutError, SocketError => e + rescue Errno::ETIMEDOUT, Errno::ECONNABORTED, TimeoutError, SocketError => e error "network exception: #{e.class}: #{e}" debug e.backtrace.join("\n") rescue BDB::Fatal => e diff --git a/lib/rbot/ircsocket.rb b/lib/rbot/ircsocket.rb index 48a4c2d7..0f724a5c 100644 --- a/lib/rbot/ircsocket.rb +++ b/lib/rbot/ircsocket.rb @@ -403,8 +403,8 @@ module Irc error "Spooling failed: #{e.inspect}" error e.backtrace.join("\n") end - end end + end def clearq if @sock @@ -453,6 +453,7 @@ module Irc end rescue => e error "SEND failed: #{e.inspect}" + raise end end -- cgit v1.2.3