HttpTransportException.php 788 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Mailer\Exception;
  11. use Symfony\Contracts\HttpClient\ResponseInterface;
  12. /**
  13. * @author Fabien Potencier <fabien@symfony.com>
  14. */
  15. class HttpTransportException extends TransportException
  16. {
  17. public function __construct(
  18. string $message,
  19. private ResponseInterface $response,
  20. int $code = 0,
  21. ?\Throwable $previous = null,
  22. ) {
  23. parent::__construct($message, $code, $previous);
  24. }
  25. public function getResponse(): ResponseInterface
  26. {
  27. return $this->response;
  28. }
  29. }