Skip to content

Commit d9118c2

Browse files
committed
Merge pull request #36 from jamesggordon/add-error-codes-to-exceptions-bugfix
Add curl_errno() to one exception
2 parents 673f758 + 063f98b commit d9118c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Madcoda/Youtube.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ public function api_get($url, $params)
472472
curl_setopt($tuCurl, CURLOPT_RETURNTRANSFER, 1);
473473
$tuData = curl_exec($tuCurl);
474474
if (curl_errno($tuCurl)) {
475-
throw new \Exception('Curl Error : ' . curl_error($tuCurl));
475+
throw new \Exception('Curl Error : ' . curl_error($tuCurl), curl_errno($tuCurl));
476476
}
477477
return $tuData;
478478
}

0 commit comments

Comments
 (0)