From b08fa27d52b25b4a001acd403490ba4cb05b245f Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 7 Jul 2008 23:37:03 +0200 Subject: freshmeat plugin: trap errors raised during XML parse --- data/rbot/plugins/freshmeat.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'data') diff --git a/data/rbot/plugins/freshmeat.rb b/data/rbot/plugins/freshmeat.rb index f7e163f0..dce6c0d4 100644 --- a/data/rbot/plugins/freshmeat.rb +++ b/data/rbot/plugins/freshmeat.rb @@ -49,7 +49,13 @@ class FreshmeatPlugin < Plugin m.reply "search for #{search} failed" return end - doc = Document.new xml + doc = nil + begin + doc = Document.new xml + rescue + debug xml + error $! + end unless doc m.reply "search for #{search} failed" return -- cgit v1.2.3