# Attempt to download the file, and rescue and report
# any (predictable) exceptions.
begin
+ puts "Fetching #{video_url}"
uu.download_with_progress_bar(video_uri, outfile_name)
rescue Errno::ECONNREFUSED => e
puts 'The connection to the server (to download the video file) was refused. Check your connection, and try again later.'
Kernel.exit(EXIT_CONNECTION_REFUSED)
- rescue Errno:EACCES => e
+ rescue Errno::EACCES => e
puts "Access denied. Check that you have write permission to the output file/directory. Details: #{e.message}."
rescue OpenURI::HTTPError => e
puts "An HTTP error occurred while downloading the video file: #{e.message}."