blob: 3401b57b8c5536e03f3ae32f1a42643a97460cb0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
<?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);
}
}
|