ExceptionInterface.php
4 years ago
IncompleteDsnException.php
1 year ago
InvalidArgumentException.php
4 years ago
InvalidResourceException.php
4 years ago
LogicException.php
4 years ago
MissingRequiredOptionException.php
1 year ago
NotFoundResourceException.php
4 years ago
ProviderException.php
1 year ago
ProviderExceptionInterface.php
1 year ago
RuntimeException.php
4 years ago
UnsupportedSchemeException.php
1 year ago
index.php
3 years ago
ProviderException.php
24 lines
| 1 | <?php |
| 2 | namespace MailPoetVendor\Symfony\Component\Translation\Exception; |
| 3 | if (!defined('ABSPATH')) exit; |
| 4 | use MailPoetVendor\Symfony\Contracts\HttpClient\ResponseInterface; |
| 5 | class ProviderException extends RuntimeException implements ProviderExceptionInterface |
| 6 | { |
| 7 | private $response; |
| 8 | private $debug; |
| 9 | public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Exception $previous = null) |
| 10 | { |
| 11 | $this->response = $response; |
| 12 | $this->debug = $response->getInfo('debug') ?? ''; |
| 13 | parent::__construct($message, $code, $previous); |
| 14 | } |
| 15 | public function getResponse() : ResponseInterface |
| 16 | { |
| 17 | return $this->response; |
| 18 | } |
| 19 | public function getDebug() : string |
| 20 | { |
| 21 | return $this->debug; |
| 22 | } |
| 23 | } |
| 24 |