Merge remote-tracking branch 'Serializator/reject-promise-on-exception-9424'
commit
4468248c46
|
@ -268,10 +268,14 @@ class HttpDownloader
|
|||
return;
|
||||
}
|
||||
|
||||
if ($job['request']['copyTo']) {
|
||||
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']);
|
||||
} else {
|
||||
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options);
|
||||
try {
|
||||
if ($job['request']['copyTo']) {
|
||||
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options, $job['request']['copyTo']);
|
||||
} else {
|
||||
$job['curl_id'] = $this->curl->download($resolve, $reject, $origin, $url, $options);
|
||||
}
|
||||
} catch (\Exception $exception) {
|
||||
$reject($exception);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue