]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Trap a possible exception when getting URL titles, even though nothing is actually...
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 24 Oct 2006 00:12:23 +0000 (00:12 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Tue, 24 Oct 2006 00:12:23 +0000 (00:12 +0000)
data/rbot/plugins/url.rb

index 7190ec5d36b4b87de12119a557caec9826ce735d..a52a9d413039834fa968e2960f1554925d4f528a 100644 (file)
@@ -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