1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-07-07 13:40:53 +02:00
ttrss/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
2022-07-31 13:55:09 +03:00

16 lines
317 B
PHP

<?php
namespace Safe\Exceptions;
class CurlException extends \Exception implements SafeExceptionInterface
{
/**
* @param \CurlHandle $ch
*/
public static function createFromPhpError($ch = null): self
{
return new self($ch ? \curl_error($ch) : '', $ch ? \curl_errno($ch) : 0);
}
}