2021-02-26 16:16:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
namespace Safe\Exceptions;
|
|
|
|
|
|
|
|
class CurlException extends \Exception implements SafeExceptionInterface
|
|
|
|
{
|
|
|
|
/**
|
2022-07-12 19:26:21 +00:00
|
|
|
* @param \CurlHandle $ch
|
2021-02-26 16:16:17 +00:00
|
|
|
*/
|
2022-07-12 19:26:21 +00:00
|
|
|
public static function createFromPhpError($ch): self
|
2021-02-26 16:16:17 +00:00
|
|
|
{
|
|
|
|
return new self(\curl_error($ch), \curl_errno($ch));
|
|
|
|
}
|
|
|
|
}
|