mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 18:29:39 +02:00
15 lines
317 B
PHP
15 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);
|
|
}
|
|
}
|