Resources/Http/Httplug/Exception/NetworkException.php
Dennis Eichhorn 7e0153ea0f perm change
2023-03-25 22:32:11 +00:00

29 lines
750 B
PHP
Executable File

<?php
namespace Http\Client\Exception;
use Psr\Http\Client\NetworkExceptionInterface as PsrNetworkException;
use Psr\Http\Message\RequestInterface;
/**
* Thrown when the request cannot be completed because of network issues.
*
* There is no response object as this exception is thrown when no response has been received.
*
* @author Márk Sági-Kazár <mark.sagikazar@gmail.com>
*/
class NetworkException extends TransferException implements PsrNetworkException
{
use RequestAwareTrait;
/**
* @param string $message
*/
public function __construct($message, RequestInterface $request, \Exception $previous = null)
{
$this->setRequest($request);
parent::__construct($message, 0, $previous);
}
}