Skip to content

Commit

Permalink
Merge pull request #7 from tsvgos/curl-error-handling
Browse files Browse the repository at this point in the history
Improve cURL error handling
  • Loading branch information
Richardds authored Oct 24, 2018
2 parents 2b1779a + 6ad4de9 commit c6ebf5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ECB.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ private static function fetch(string $url): string
return $data;
}

$curl_error = curl_error($ch);
curl_close($ch);

throw new ECBException(curl_error($ch), ECBException::DATA_DOWNLOAD_FAILED);
throw new ECBException($curl_error, ECBException::DATA_DOWNLOAD_FAILED);
}
}

0 comments on commit c6ebf5b

Please sign in to comment.