summaryrefslogtreecommitdiff
path: root/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
blob: d0dbdb69582548224114bafdde0aba1b62a4ae28 (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): self
    {
        return new self(\curl_error($ch), \curl_errno($ch));
    }
}