From: Giuseppe Bilotta Date: Sun, 28 Dec 2008 12:07:39 +0000 (+0100) Subject: plugins: raise a descriptive LoadError when the db is corrupt on load X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=51c35168127e0faed56bceb3f5103f92ed31478c;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git plugins: raise a descriptive LoadError when the db is corrupt on load --- 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