]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Exit for good when getting a DBFatal error
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 24 Oct 2011 08:44:09 +0000 (10:44 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 24 Oct 2011 08:44:09 +0000 (10:44 +0200)
lib/rbot/ircbot.rb

index e740e64b44776da87bea8c2b5dbc3124f610c570..92f5fe55c88c400601abeb76367f2c8c189cec95 100644 (file)
@@ -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