Add useful error information on non-http error

This commit is contained in:
Aidan Hobson Sayers
2015-01-26 00:04:15 +00:00
parent ef17aeb616
commit 1a98893ff7

4
emsdk
View File

@@ -294,8 +294,8 @@ def download_file(url, dstpath, download_even_if_exists=False):
print "HTTP error with URL '" + url + "': " + str(e)
rmfile(file_name)
return None
except:
print "Error downloading URL '" + url + "'!"
except Exception, e:
print "Error downloading URL '" + url + "': " + str(e)
rmfile(file_name)
return None
return file_name