summaryrefslogtreecommitdiff
path: root/rbot/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'rbot/plugins')
-rw-r--r--rbot/plugins/slashdot.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/rbot/plugins/slashdot.rb b/rbot/plugins/slashdot.rb
index 38005bde..b09ac7a7 100644
--- a/rbot/plugins/slashdot.rb
+++ b/rbot/plugins/slashdot.rb
@@ -33,7 +33,13 @@ class SlashdotPlugin < Plugin
m.reply "search for #{search} failed"
return
end
- doc = Document.new xml
+ begin
+ doc = Document.new xml
+ rescue REXML::ParseException => e
+ puts e
+ m.reply "couldn't parse output XML: #{e.class}"
+ return
+ end
unless doc
m.reply "search for #{search} failed"
return
@@ -58,7 +64,7 @@ class SlashdotPlugin < Plugin
end
doc = Document.new xml
unless doc
- m.reply "slashdot news parse failed"
+ m.reply "slashdot news parse failed (invalid xml)"
return
end
done = 0