| 1 |
<?php |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
namespace Symfony\Component\Translation\Exception; |
| 13 |
|
| 14 |
use Symfony\Contracts\HttpClient\ResponseInterface; |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
class ProviderException extends RuntimeException implements ProviderExceptionInterface |
| 20 |
{ |
| 21 |
private string $debug; |
| 22 |
|
| 23 |
public function __construct( |
| 24 |
string $message, |
| 25 |
private ResponseInterface $response, |
| 26 |
int $code = 0, |
| 27 |
?\Exception $previous = null, |
| 28 |
) { |
| 29 |
$this->debug = $response->getInfo('debug') ?? ''; |
| 30 |
|
| 31 |
parent::__construct($message, $code, $previous); |
| 32 |
} |
| 33 |
|
| 34 |
public function getResponse(): ResponseInterface |
| 35 |
{ |
| 36 |
return $this->response; |
| 37 |
} |
| 38 |
|
| 39 |
public function getDebug(): string |
| 40 |
{ |
| 41 |
return $this->debug; |
| 42 |
} |
| 43 |
} |