summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-12-28 13:07:39 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-12-28 13:07:39 +0100
commit51c35168127e0faed56bceb3f5103f92ed31478c (patch)
treec0b7073e4a6a417a03951706c6ccd26437641e74
parent97732b1926746040373e803c3d7b9c43939aa6e6 (diff)
plugins: raise a descriptive LoadError when the db is corrupt on load
-rw-r--r--data/rbot/plugins/reaction.rb2
-rw-r--r--data/rbot/plugins/rss.rb2
-rw-r--r--data/rbot/plugins/script.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/data/rbot/plugins/reaction.rb b/data/rbot/plugins/reaction.rb
index d358000c..ee338e2d 100644
--- a/data/rbot/plugins/reaction.rb
+++ b/data/rbot/plugins/reaction.rb
@@ -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
diff --git a/data/rbot/plugins/rss.rb b/data/rbot/plugins/rss.rb
index 45ee4a23..7dcfdf66 100644
--- a/data/rbot/plugins/rss.rb
+++ b/data/rbot/plugins/rss.rb
@@ -445,7 +445,7 @@ class RSSFeedsPlugin < Plugin
}
@feeds = @registry[:feeds]
- raise unless @feeds
+ raise LoadError, "corrupted feed database" unless @feeds
@registry.recovery = nil
diff --git a/data/rbot/plugins/script.rb b/data/rbot/plugins/script.rb
index 793064bd..849783b8 100644
--- a/data/rbot/plugins/script.rb
+++ b/data/rbot/plugins/script.rb
@@ -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