]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
BDB::Fatal errors in plugins are now raised to toplevel; bdb lg_max increased to...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Jul 2006 07:41:25 +0000 (07:41 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 30 Jul 2006 07:41:25 +0000 (07:41 +0000)
lib/rbot/dbhash.rb
lib/rbot/plugins.rb

index 6cae7b2b40406c1961a2f010d13cbc6424d9a654..b32da5004fdf34265f5d15d7a119a4f2d4b86d58 100644 (file)
@@ -69,7 +69,7 @@ module Irc
     @@env=nil
     # TODO: make this customizable
     # Note that it must be at least four times lg_bsize
-    @@lg_max = 2*1024*1024
+    @@lg_max = 8*1024*1024
     # absfilename:: use +key+ as an actual filename, don't prepend the bot's
     #               config path and don't append ".db"
     def initialize(bot, key, absfilename=false)
index b735c4c5f8a49e10d7fddf74084fc31d347b1ad5..50b5576b89a485b9b83479762bb2dc5bf98a8dbf 100644 (file)
@@ -401,6 +401,10 @@ module Plugins
           @@bot.auth.allow?(m.plugin, m.source, m.replyto))
         begin
           @@plugins[m.plugin].privmsg(m)
+        rescue BDB::Fatal => err
+          error "plugin #{@@plugins[m.plugin].name} privmsg() failed: #{err.class}: #{err}"
+          error err.backtrace.join("\n")
+          raise
         rescue Exception => err
           #rescue TimeoutError, StandardError, NameError, SyntaxError => err
           error "plugin #{@@plugins[m.plugin].name} privmsg() failed: #{err.class}: #{err}"