summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-07 23:37:03 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-07 23:37:03 +0200
commitb08fa27d52b25b4a001acd403490ba4cb05b245f (patch)
tree5e6bf63062a6abb3dde6ac02edeb5d36123ba7dc
parent61a22b729532316193612eac4f948ff11aa57f50 (diff)
freshmeat plugin: trap errors raised during XML parse
-rw-r--r--data/rbot/plugins/freshmeat.rb8
1 files changed, 7 insertions, 1 deletions
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