summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-10-24 00:12:23 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-10-24 00:12:23 +0000
commitc66e854af4f9d6be1947564638289fe781f1c9e9 (patch)
tree6dfee13951fbafd18cc2d1cb70f1214a31dee4da
parent92f9c545da99e904bde2fe4d967e121c14689563 (diff)
Trap a possible exception when getting URL titles, even though nothing is actually done to handle it
-rw-r--r--data/rbot/plugins/url.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/data/rbot/plugins/url.rb b/data/rbot/plugins/url.rb
index 7190ec5d..a52a9d41 100644
--- a/data/rbot/plugins/url.rb
+++ b/data/rbot/plugins/url.rb
@@ -118,6 +118,7 @@ class UrlPlugin < Plugin
if @bot.config['url.display_link_info']
debug "Getting title for #{urlstr}..."
+ begin
title = get_title_for_url urlstr
if title
m.reply title
@@ -125,6 +126,9 @@ class UrlPlugin < Plugin
else
debug "Title not found!"
end
+ rescue => e
+ debug "Failed: #{e}"
+ end
end
# check to see if this url is already listed