diff --git a/lib/image_finder.rb b/lib/image_finder.rb index 35b7603..10baeac 100644 --- a/lib/image_finder.rb +++ b/lib/image_finder.rb @@ -39,10 +39,11 @@ def parse(data) _image_urls = uris.select{|u| begin uri = URI.parse(u) - rescue URI::InvalidURIError + rescue Exception => ex # Feel no pain! This guards against crappy uri parsing errors, # e.g. on "URIs" like "TRON:" (which I'm getting an error on right - # now). + # now). + puts "Imagefinder exception: #{ex}" end if uri && uri.path File.extname(uri.path) == ".jpg" ||