diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-07 23:37:03 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-07 23:37:03 +0200 |
commit | b08fa27d52b25b4a001acd403490ba4cb05b245f (patch) | |
tree | 5e6bf63062a6abb3dde6ac02edeb5d36123ba7dc /data | |
parent | 61a22b729532316193612eac4f948ff11aa57f50 (diff) |
freshmeat plugin: trap errors raised during XML parse
Diffstat (limited to 'data')
-rw-r--r-- | data/rbot/plugins/freshmeat.rb | 8 |
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 |