ExceptionInterface.php
2 months ago
IncompleteDsnException.php
2 months ago
InvalidArgumentException.php
2 months ago
InvalidResourceException.php
2 months ago
LogicException.php
2 months ago
MissingRequiredOptionException.php
2 months ago
NotFoundResourceException.php
2 months ago
ProviderException.php
2 months ago
ProviderExceptionInterface.php
2 months ago
RuntimeException.php
2 months ago
UnsupportedSchemeException.php
2 months ago
ProviderException.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | /* |
| 4 | * This file is part of the Symfony package. |
| 5 | * |
| 6 | * (c) Fabien Potencier <fabien@symfony.com> |
| 7 | * |
| 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | * file that was distributed with this source code. |
| 10 | */ |
| 11 | namespace ProfilePressVendor\Symfony\Component\Translation\Exception; |
| 12 | |
| 13 | use ProfilePressVendor\Symfony\Contracts\HttpClient\ResponseInterface; |
| 14 | /** |
| 15 | * @author Fabien Potencier <fabien@symfony.com> |
| 16 | */ |
| 17 | class ProviderException extends RuntimeException implements ProviderExceptionInterface |
| 18 | { |
| 19 | private $response; |
| 20 | private $debug; |
| 21 | public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Exception $previous = null) |
| 22 | { |
| 23 | $this->response = $response; |
| 24 | $this->debug = $response->getInfo('debug') ?? ''; |
| 25 | parent::__construct($message, $code, $previous); |
| 26 | } |
| 27 | public function getResponse(): ResponseInterface |
| 28 | { |
| 29 | return $this->response; |
| 30 | } |
| 31 | public function getDebug(): string |
| 32 | { |
| 33 | return $this->debug; |
| 34 | } |
| 35 | } |
| 36 |