1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
Oinktube/vendor/thecodingmachine/safe/lib/Exceptions/CurlException.php
2024-08-21 09:11:05 -03:00

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);
}
}