summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-10-24 10:44:09 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-10-24 10:44:09 +0200
commit00a72a8bb44dc85fa4d7abf4ac9b9813c26ecfcd (patch)
tree3189f707b2aa3a05f575544d23d7667817415be6
parentb102d281d8bb7fb28f8b31fec983d56452edbd24 (diff)
Exit for good when getting a DBFatal error
-rw-r--r--lib/rbot/ircbot.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rbot/ircbot.rb b/lib/rbot/ircbot.rb
index e740e64b..92f5fe55 100644
--- a/lib/rbot/ircbot.rb
+++ b/lib/rbot/ircbot.rb
@@ -987,6 +987,11 @@ class Bot
end
connect
+ rescue DBFatal => e
+ fatal "fatal db error: #{e.pretty_inspect}"
+ DBTree.stats
+ log_session_end
+ exit 2
rescue Exception => e
error e
will_wait = true