lib/down.rb in down-2.4.2 vs lib/down.rb in down-2.4.3

- old
+ new

@@ -57,13 +57,13 @@ downloaded_file = uri.open(open_uri_options) rescue OpenURI::HTTPRedirect => redirect url = redirect.uri.to_s retry if (tries -= 1) > 0 - raise Down::NotFound, "too many redirects" + raise Down::NotFound, "too many redirects: #{url}" rescue => error raise if error.is_a?(Down::Error) - raise Down::NotFound, "file not found" + raise Down::NotFound, "file not found: #{url}" end # open-uri will return a StringIO instead of a Tempfile if the filesize is # less than 10 KB, so if it happens we convert it back to Tempfile. We want # to do this with a Tempfile as well, because open-uri doesn't preserve the