]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
plugins: raise a descriptive LoadError when the db is corrupt on load
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 28 Dec 2008 12:07:39 +0000 (13:07 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 28 Dec 2008 12:07:39 +0000 (13:07 +0100)
data/rbot/plugins/reaction.rb
data/rbot/plugins/rss.rb
data/rbot/plugins/script.rb

index d358000c8582945ee5961a5468cd63221dad6535..ee338e2d38dae244e6487f1a5150dc5663f14956 100644 (file)
@@ -170,7 +170,7 @@ class ReactionPlugin < Plugin
     super
     if @registry.has_key?(:reactions)
       @reactions = @registry[:reactions]
-      raise unless @reactions
+      raise LoadError, "corrupted reaction database" unless @reactions
     else
       @reactions = []
     end
index 45ee4a2300aa866d8d754be630cd489f79e1d5a5..7dcfdf6649977a2eccac37961163cae7964848e6 100644 (file)
@@ -445,7 +445,7 @@ class RSSFeedsPlugin < Plugin
       }
 
       @feeds = @registry[:feeds]
-      raise unless @feeds
+      raise LoadError, "corrupted feed database" unless @feeds
 
       @registry.recovery = nil
 
index 793064bd20faa97723cd1db92796b4f1baf58fbb..849783b8917ba5742fd71c955d5099da259dbe1c 100644 (file)
@@ -21,7 +21,7 @@ class ScriptPlugin < Plugin
     super
     if @registry.has_key?(:commands)
       @commands = @registry[:commands]
-      raise unless @commands
+      raise LoadError, "corrupted script database" unless @commands
     else
       @commands = Hash.new
     end