Improve curl error reporting some more
parent
852990d06c
commit
5248d6c9f1
|
@ -299,7 +299,10 @@ class CurlDownloader
|
|||
try {
|
||||
// TODO progress
|
||||
if (CURLE_OK !== $errno || $error) {
|
||||
throw new TransportException('curl error while downloading '.Url::sanitize($progress['url']).': '.($error ?: '#'.$errno));
|
||||
if (!$error && function_exists('curl_strerror')) {
|
||||
$error = curl_strerror($errno);
|
||||
}
|
||||
throw new TransportException('curl error '.$errno.' while downloading '.Url::sanitize($progress['url']).': '.$error);
|
||||
}
|
||||
|
||||
$statusCode = $progress['http_code'];
|
||||
|
|
Loading…
Reference in New Issue