Debian Codegraph @

lib/3rdParty/composer/symfony/translation/Exception/ProviderException.php

raw symbols SCIP
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <[email protected]>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Translation\Exception;
13
14 use Symfony\Contracts\HttpClient\ResponseInterface;
15
16 /**
17 * @author Fabien Potencier <[email protected]>
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 }