summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gilbert <tom@linuxbrit.co.uk>2005-08-24 19:12:14 +0000
committerTom Gilbert <tom@linuxbrit.co.uk>2005-08-24 19:12:14 +0000
commit1fd21891fde8e97cb91941c32f7e49c4f4881fa7 (patch)
treefd0b47f2a7a78c4751aaa88077f449ed8ddce7a7
parent32f53f6a17396a8828c30c58ce8545c93c04ff2c (diff)
applied patch from ticket #15, and added .inspect to try and work out what
exception "reset by peer" gives you. One thing I'm finding troublesome with ruby is working out what exceptions things are going to throw. Especially poorly documented stuff implemented in C. Why the Socket module throws an exception for "reset by peer" which *isn't* a SocketError I don't know, but apparently it does.
-rwxr-xr-xbin/rbot2
-rw-r--r--lib/rbot/ircbot.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/rbot b/bin/rbot
index 6ede9a61..44261789 100755
--- a/bin/rbot
+++ b/bin/rbot
@@ -56,7 +56,7 @@ end
begin
require 'rbot/ircbot'
rescue LoadError => e
- puts "Error: couldn't find the rbot/ircbot module for loading\n - did you install rbot using install.rb?"
+ puts "Error: couldn't find the rbot/ircbot module for loading\n - did you install rbot using setup.rb?"
exit 2
end
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index 68c2bd47..c30d0e6d 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -116,7 +116,7 @@ class IrcBot
@argv = params[:argv]
unless FileTest.directory? Config::datadir
- puts "data directory '#{Config::datadir}' not found, did you install.rb?"
+ puts "data directory '#{Config::datadir}' not found, did you setup.rb?"
exit 2
end
@@ -330,7 +330,7 @@ class IrcBot
puts e.backtrace.join("\n")
@socket.close # now we reconnect
rescue => e # TODO be selective, only grab Network errors
- puts "unexpected exception: connection closed: #{e}"
+ puts "unexpected exception: connection closed: #{e.inspect}"
puts e.backtrace.join("\n")
exit 2
end