lib/carrierwave/uploader/download.rb in carrierwave-0.7.1 vs lib/carrierwave/uploader/download.rb in carrierwave-0.8.0
- old
+ new
@@ -35,11 +35,11 @@
@file = Kernel.open(@uri.to_s)
@file = @file.is_a?(String) ? StringIO.new(@file) : @file
end
@file
- rescue
- raise CarrierWave::DownloadError, "could not download file"
+ rescue Exception => e
+ raise CarrierWave::DownloadError, "could not download file: #{e.message}"
end
def method_missing(*args, &block)
file.send(*args, &block)
end