[HttpClient][Psr18Client] Remove Psr18ExceptionTrait
This commit is contained in:
parent
bbf7ed12b1
commit
c1746d8b14
@ -105,7 +105,7 @@ final class Psr18Client implements ClientInterface
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
trait Psr18ExceptionTrait
|
||||
class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface
|
||||
{
|
||||
private $request;
|
||||
|
||||
@ -121,18 +121,21 @@ trait Psr18ExceptionTrait
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class Psr18NetworkException extends \RuntimeException implements NetworkExceptionInterface
|
||||
{
|
||||
use Psr18ExceptionTrait;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class Psr18RequestException extends \InvalidArgumentException implements RequestExceptionInterface
|
||||
{
|
||||
use Psr18ExceptionTrait;
|
||||
private $request;
|
||||
|
||||
public function __construct(TransportExceptionInterface $e, RequestInterface $request)
|
||||
{
|
||||
parent::__construct($e->getMessage(), 0, $e);
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
public function getRequest(): RequestInterface
|
||||
{
|
||||
return $this->request;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user