One Hat Cyber Team
Your IP:
216.73.216.30
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
proc
/
self
/
root
/
proc
/
self
/
root
/
proc
/
self
/
cwd
/
View File Name :
Exception.tar
Exception.php 0000644 00000000541 15107350321 0007210 0 ustar 00 <?php declare(strict_types=1); /* * This file is part of sebastian/diff. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; use Throwable; interface Exception extends Throwable { } ConfigurationException.php 0000644 00000001676 15107350321 0011752 0 ustar 00 <?php declare(strict_types=1); /* * This file is part of sebastian/diff. * * (c) Sebastian Bergmann <sebastian@phpunit.de> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace SebastianBergmann\Diff; use function gettype; use function is_object; use function sprintf; use Exception; final class ConfigurationException extends InvalidArgumentException { public function __construct( string $option, string $expected, $value, int $code = 0, Exception $previous = null ) { parent::__construct( sprintf( 'Option "%s" must be %s, got "%s".', $option, $expected, is_object($value) ? $value::class : (null === $value ? '<null>' : gettype($value) . '#' . $value) ), $code, $previous ); } } InvalidArgumentException.php 0000644 00000001011 15107350321 0012213 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * Base InvalidArgumentException for the Translation component. * * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } TimeSourceException.php 0000644 00000001104 15107364470 0011216 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate that the source of time encountered an error */ class TimeSourceException extends PhpRuntimeException implements UuidExceptionInterface { } InvalidUuidStringException.php 0000644 00000001267 15107364470 0012555 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; /** * Thrown to indicate that the string received is not a valid UUID * * The InvalidArgumentException that this extends is the ramsey/uuid version * of this exception. It exists in the same namespace as this class. */ class InvalidUuidStringException extends InvalidArgumentException implements UuidExceptionInterface { } NameException.php 0000644 00000001131 15107364470 0010017 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate that an error occurred while attempting to hash a * namespace and name */ class NameException extends PhpRuntimeException implements UuidExceptionInterface { } InvalidBytesException.php 0000644 00000001122 15107364470 0011534 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate that the bytes being operated on are invalid in some way */ class InvalidBytesException extends PhpRuntimeException implements UuidExceptionInterface { } UnsupportedOperationException.php 0000644 00000001111 15107364470 0013346 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use LogicException as PhpLogicException; /** * Thrown to indicate that the requested operation is not supported */ class UnsupportedOperationException extends PhpLogicException implements UuidExceptionInterface { } DceSecurityException.php 0000644 00000001143 15107364470 0011365 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate an exception occurred while dealing with DCE Security * (version 2) UUIDs */ class DceSecurityException extends PhpRuntimeException implements UuidExceptionInterface { } RandomSourceException.php 0000644 00000001362 15107364470 0011546 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate that the source of random data encountered an error * * This exception is used mostly to indicate that random_bytes() or random_int() * threw an exception. However, it may be used for other sources of random data. */ class RandomSourceException extends PhpRuntimeException implements UuidExceptionInterface { } DateTimeException.php 0000644 00000001124 15107364470 0010635 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate that the PHP DateTime extension encountered an exception/error */ class DateTimeException extends PhpRuntimeException implements UuidExceptionInterface { } BuilderNotFoundException.php 0000644 00000001104 15107364470 0012202 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate that no suitable builder could be found */ class BuilderNotFoundException extends PhpRuntimeException implements UuidExceptionInterface { } UnableToBuildUuidException.php 0000644 00000001102 15107364470 0012455 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate a builder is unable to build a UUID */ class UnableToBuildUuidException extends PhpRuntimeException implements UuidExceptionInterface { } NodeException.php 0000644 00000001123 15107364470 0010025 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use RuntimeException as PhpRuntimeException; /** * Thrown to indicate that attempting to fetch or create a node ID encountered an error */ class NodeException extends PhpRuntimeException implements UuidExceptionInterface { } UuidExceptionInterface.php 0000644 00000000666 15107364470 0011702 0 ustar 00 <?php /** * This file is part of the ramsey/uuid library * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @copyright Copyright (c) Ben Ramsey <ben@benramsey.com> * @license http://opensource.org/licenses/MIT MIT */ declare(strict_types=1); namespace Ramsey\Uuid\Exception; use Throwable; interface UuidExceptionInterface extends Throwable { } MalformedUriException.php 0000644 00000000365 15107450030 0011521 0 ustar 00 <?php declare(strict_types=1); namespace GuzzleHttp\Psr7\Exception; use InvalidArgumentException; /** * Exception thrown if a URI cannot be parsed because it's malformed. */ class MalformedUriException extends InvalidArgumentException { } UnknownCurrencyException.php 0000644 00000000406 15107560401 0012305 0 ustar 00 <?php declare(strict_types=1); namespace Money\Exception; use DomainException; use Money\Exception; /** * Thrown when trying to get ISO currency that does not exists. */ final class UnknownCurrencyException extends DomainException implements Exception { } ParserException.php 0000644 00000000373 15107560401 0010372 0 ustar 00 <?php declare(strict_types=1); namespace Money\Exception; use Money\Exception; use RuntimeException; /** * Thrown when a string cannot be parsed to a Money object. */ final class ParserException extends RuntimeException implements Exception { } UnresolvableCurrencyPairException.php 0000644 00000001422 15107560401 0014122 0 ustar 00 <?php declare(strict_types=1); namespace Money\Exception; use InvalidArgumentException; use Money\Currency; use Money\Exception; use function sprintf; /** * Thrown when there is no currency pair (rate) available for the given currencies. */ final class UnresolvableCurrencyPairException extends InvalidArgumentException implements Exception { /** * Creates an exception from Currency objects. */ public static function createFromCurrencies(Currency $baseCurrency, Currency $counterCurrency): UnresolvableCurrencyPairException { $message = sprintf( 'Cannot resolve a currency pair for currencies: %s/%s', $baseCurrency->getCode(), $counterCurrency->getCode() ); return new self($message); } } FormatterException.php 0000644 00000000403 15107560401 0011073 0 ustar 00 <?php declare(strict_types=1); namespace Money\Exception; use Money\Exception; use RuntimeException; /** * Thrown when a Money object cannot be formatted into a string. */ final class FormatterException extends RuntimeException implements Exception { } error_log 0000644 00000017230 15107560401 0006463 0 ustar 00 [19-Nov-2025 06:40:31 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/LogicException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/LogicException.php on line 19 [19-Nov-2025 06:40:46 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\IncompleteDsnException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/MissingRequiredOptionException.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/MissingRequiredOptionException.php on line 17 [19-Nov-2025 06:44:19 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/RuntimeException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/RuntimeException.php on line 19 [19-Nov-2025 06:54:40 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/NotFoundResourceException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/NotFoundResourceException.php on line 19 [19-Nov-2025 06:56:41 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\LogicException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/UnsupportedSchemeException.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/UnsupportedSchemeException.php on line 17 [19-Nov-2025 06:57:12 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidResourceException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidResourceException.php on line 19 [19-Nov-2025 06:57:19 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderExceptionInterface.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderExceptionInterface.php on line 17 [19-Nov-2025 06:59:43 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\InvalidArgumentException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/IncompleteDsnException.php:14 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/IncompleteDsnException.php on line 14 [19-Nov-2025 07:01:40 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidArgumentException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidArgumentException.php on line 19 [19-Nov-2025 07:11:25 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\RuntimeException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderException.php on line 19 [19-Nov-2025 13:26:09 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\IncompleteDsnException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/MissingRequiredOptionException.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/MissingRequiredOptionException.php on line 17 [19-Nov-2025 13:32:00 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/LogicException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/LogicException.php on line 19 [19-Nov-2025 13:32:56 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/RuntimeException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/RuntimeException.php on line 19 [19-Nov-2025 13:39:16 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/NotFoundResourceException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/NotFoundResourceException.php on line 19 [19-Nov-2025 13:39:45 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidResourceException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidResourceException.php on line 19 [19-Nov-2025 13:40:47 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\LogicException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/UnsupportedSchemeException.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/UnsupportedSchemeException.php on line 17 [19-Nov-2025 13:47:18 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidArgumentException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/InvalidArgumentException.php on line 19 [19-Nov-2025 13:47:50 UTC] PHP Fatal error: Uncaught Error: Interface "Symfony\Component\Translation\Exception\ExceptionInterface" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderExceptionInterface.php:17 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderExceptionInterface.php on line 17 [19-Nov-2025 13:52:25 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\InvalidArgumentException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/IncompleteDsnException.php:14 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/IncompleteDsnException.php on line 14 [19-Nov-2025 13:59:07 UTC] PHP Fatal error: Uncaught Error: Class "Symfony\Component\Translation\Exception\RuntimeException" not found in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderException.php:19 Stack trace: #0 {main} thrown in /home/fluxyjvi/public_html/project/vendor/symfony/translation/Exception/ProviderException.php on line 19 ValidationException.php 0000644 00000001536 15110762417 0011237 0 ustar 00 <?php declare(strict_types=1); /* * This file is part of the league/config package. * * (c) Colin O'Dell <colinodell@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\Config\Exception; use Nette\Schema\ValidationException as NetteException; final class ValidationException extends InvalidConfigurationException { /** @var string[] */ private array $messages; public function __construct(NetteException $innerException) { parent::__construct($innerException->getMessage(), (int) $innerException->getCode(), $innerException); $this->messages = $innerException->getMessages(); } /** * @return string[] */ public function getMessages(): array { return $this->messages; } } InvalidConfigurationException.php 0000644 00000002403 15110762417 0013255 0 ustar 00 <?php declare(strict_types=1); /* * This file is part of the league/config package. * * (c) Colin O'Dell <colinodell@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\Config\Exception; class InvalidConfigurationException extends \UnexpectedValueException implements ConfigurationExceptionInterface { /** * @param string $option Name/path of the option * @param mixed $valueGiven The invalid option that was provided * @param ?string $description Additional text describing the issue (optional) */ public static function forConfigOption(string $option, $valueGiven, ?string $description = null): self { $message = \sprintf('Invalid config option for "%s": %s', $option, self::getDebugValue($valueGiven)); if ($description !== null) { $message .= \sprintf(' (%s)', $description); } return new self($message); } /** * @param mixed $value * * @psalm-pure */ private static function getDebugValue($value): string { if (\is_object($value)) { return \get_class($value); } return \print_r($value, true); } } UnknownOptionException.php 0000644 00000001354 15110762417 0011773 0 ustar 00 <?php declare(strict_types=1); /* * This file is part of the league/config package. * * (c) Colin O'Dell <colinodell@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\Config\Exception; use Throwable; final class UnknownOptionException extends \InvalidArgumentException implements ConfigurationExceptionInterface { private string $path; public function __construct(string $message, string $path, int $code = 0, ?Throwable $previous = null) { parent::__construct($message, $code, $previous); $this->path = $path; } public function getPath(): string { return $this->path; } } ConfigurationExceptionInterface.php 0000644 00000000673 15110762417 0013576 0 ustar 00 <?php declare(strict_types=1); /* * This file is part of the league/config package. * * (c) Colin O'Dell <colinodell@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\Config\Exception; /** * Marker interface for any/all exceptions thrown by this library */ interface ConfigurationExceptionInterface extends \Throwable { } Transport/Curl.php 0000644 00000002565 15111160361 0010161 0 ustar 00 <?php /** * CURL Transport Exception. * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Transport; use WpOrg\Requests\Exception\Transport; /** * CURL Transport Exception. * * @package Requests\Exceptions */ final class Curl extends Transport { const EASY = 'cURLEasy'; const MULTI = 'cURLMulti'; const SHARE = 'cURLShare'; /** * cURL error code * * @var integer */ protected $code = -1; /** * Which type of cURL error * * EASY|MULTI|SHARE * * @var string */ protected $type = 'Unknown'; /** * Clear text error message * * @var string */ protected $reason = 'Unknown'; /** * Create a new exception. * * @param string $message Exception message. * @param string $type Exception type. * @param mixed $data Associated data, if applicable. * @param int $code Exception numerical code, if applicable. */ public function __construct($message, $type, $data = null, $code = 0) { if ($type !== null) { $this->type = $type; } if ($code !== null) { $this->code = (int) $code; } if ($message !== null) { $this->reason = $message; } $message = sprintf('%d %s', $this->code, $this->reason); parent::__construct($message, $this->type, $data, $this->code); } /** * Get the error message. * * @return string */ public function getReason() { return $this->reason; } } Transport.php 0000644 00000000364 15111160361 0007247 0 ustar 00 <?php /** * Transport Exception * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception; use WpOrg\Requests\Exception; /** * Transport Exception * * @package Requests\Exceptions */ class Transport extends Exception {} Http.php 0000644 00000003006 15111160361 0006166 0 ustar 00 <?php /** * Exception based on HTTP response * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception; use WpOrg\Requests\Exception; use WpOrg\Requests\Exception\Http\StatusUnknown; /** * Exception based on HTTP response * * @package Requests\Exceptions */ class Http extends Exception { /** * HTTP status code * * @var integer */ protected $code = 0; /** * Reason phrase * * @var string */ protected $reason = 'Unknown'; /** * Create a new exception * * There is no mechanism to pass in the status code, as this is set by the * subclass used. Reason phrases can vary, however. * * @param string|null $reason Reason phrase * @param mixed $data Associated data */ public function __construct($reason = null, $data = null) { if ($reason !== null) { $this->reason = $reason; } $message = sprintf('%d %s', $this->code, $this->reason); parent::__construct($message, 'httpresponse', $data, $this->code); } /** * Get the status message. * * @return string */ public function getReason() { return $this->reason; } /** * Get the correct exception class for a given error code * * @param int|bool $code HTTP status code, or false if unavailable * @return string Exception class name to use */ public static function get_class($code) { if (!$code) { return StatusUnknown::class; } $class = sprintf('\WpOrg\Requests\Exception\Http\Status%d', $code); if (class_exists($class)) { return $class; } return StatusUnknown::class; } } ArgumentCount.php 0000644 00000002664 15111160361 0010053 0 ustar 00 <?php namespace WpOrg\Requests\Exception; use WpOrg\Requests\Exception; /** * Exception for when an incorrect number of arguments are passed to a method. * * Typically, this exception is used when all arguments for a method are optional, * but certain arguments need to be passed together, i.e. a method which can be called * with no arguments or with two arguments, but not with one argument. * * Along the same lines, this exception is also used if a method expects an array * with a certain number of elements and the provided number of elements does not comply. * * @package Requests\Exceptions * @since 2.0.0 */ final class ArgumentCount extends Exception { /** * Create a new argument count exception with a standardized text. * * @param string $expected The argument count expected as a phrase. * For example: `at least 2 arguments` or `exactly 1 argument`. * @param int $received The actual argument count received. * @param string $type Exception type. * * @return \WpOrg\Requests\Exception\ArgumentCount */ public static function create($expected, $received, $type) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); return new self( sprintf( '%s::%s() expects %s, %d given', $stack[1]['class'], $stack[1]['function'], $expected, $received ), $type ); } } InvalidArgument.php 0000644 00000002122 15111160361 0010336 0 ustar 00 <?php namespace WpOrg\Requests\Exception; use InvalidArgumentException; /** * Exception for an invalid argument passed. * * @package Requests\Exceptions * @since 2.0.0 */ final class InvalidArgument extends InvalidArgumentException { /** * Create a new invalid argument exception with a standardized text. * * @param int $position The argument position in the function signature. 1-based. * @param string $name The argument name in the function signature. * @param string $expected The argument type expected as a string. * @param string $received The actual argument type received. * * @return \WpOrg\Requests\Exception\InvalidArgument */ public static function create($position, $name, $expected, $received) { // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_debug_backtrace $stack = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); return new self( sprintf( '%s::%s(): Argument #%d (%s) must be of type %s, %s given', $stack[1]['class'], $stack[1]['function'], $position, $name, $expected, $received ) ); } } Http/Status415.php 0000644 00000000752 15111160361 0007710 0 ustar 00 <?php /** * Exception for 415 Unsupported Media Type responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 415 Unsupported Media Type responses * * @package Requests\Exceptions */ final class Status415 extends Http { /** * HTTP status code * * @var integer */ protected $code = 415; /** * Reason phrase * * @var string */ protected $reason = 'Unsupported Media Type'; } Http/Status502.php 0000644 00000000711 15111160361 0007700 0 ustar 00 <?php /** * Exception for 502 Bad Gateway responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 502 Bad Gateway responses * * @package Requests\Exceptions */ final class Status502 extends Http { /** * HTTP status code * * @var integer */ protected $code = 502; /** * Reason phrase * * @var string */ protected $reason = 'Bad Gateway'; } Http/Status414.php 0000644 00000000747 15111160361 0007713 0 ustar 00 <?php /** * Exception for 414 Request-URI Too Large responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 414 Request-URI Too Large responses * * @package Requests\Exceptions */ final class Status414 extends Http { /** * HTTP status code * * @var integer */ protected $code = 414; /** * Reason phrase * * @var string */ protected $reason = 'Request-URI Too Large'; } Http/Status501.php 0000644 00000000725 15111160361 0007704 0 ustar 00 <?php /** * Exception for 501 Not Implemented responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 501 Not Implemented responses * * @package Requests\Exceptions */ final class Status501 extends Http { /** * HTTP status code * * @var integer */ protected $code = 501; /** * Reason phrase * * @var string */ protected $reason = 'Not Implemented'; } Http/Status400.php 0000644 00000000711 15111160361 0007675 0 ustar 00 <?php /** * Exception for 400 Bad Request responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 400 Bad Request responses * * @package Requests\Exceptions */ final class Status400 extends Http { /** * HTTP status code * * @var integer */ protected $code = 400; /** * Reason phrase * * @var string */ protected $reason = 'Bad Request'; } Http/Status408.php 0000644 00000000725 15111160361 0007712 0 ustar 00 <?php /** * Exception for 408 Request Timeout responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 408 Request Timeout responses * * @package Requests\Exceptions */ final class Status408 extends Http { /** * HTTP status code * * @var integer */ protected $code = 408; /** * Reason phrase * * @var string */ protected $reason = 'Request Timeout'; } Http/Status305.php 0000644 00000000703 15111160361 0007702 0 ustar 00 <?php /** * Exception for 305 Use Proxy responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 305 Use Proxy responses * * @package Requests\Exceptions */ final class Status305 extends Http { /** * HTTP status code * * @var integer */ protected $code = 305; /** * Reason phrase * * @var string */ protected $reason = 'Use Proxy'; } Http/StatusUnknown.php 0000644 00000001712 15111160361 0011033 0 ustar 00 <?php /** * Exception for unknown status responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; use WpOrg\Requests\Response; /** * Exception for unknown status responses * * @package Requests\Exceptions */ final class StatusUnknown extends Http { /** * HTTP status code * * @var integer|bool Code if available, false if an error occurred */ protected $code = 0; /** * Reason phrase * * @var string */ protected $reason = 'Unknown'; /** * Create a new exception * * If `$data` is an instance of {@see \WpOrg\Requests\Response}, uses the status * code from it. Otherwise, sets as 0 * * @param string|null $reason Reason phrase * @param mixed $data Associated data */ public function __construct($reason = null, $data = null) { if ($data instanceof Response) { $this->code = (int) $data->status_code; } parent::__construct($reason, $data); } } Http/Status403.php 0000644 00000000703 15111160361 0007701 0 ustar 00 <?php /** * Exception for 403 Forbidden responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 403 Forbidden responses * * @package Requests\Exceptions */ final class Status403 extends Http { /** * HTTP status code * * @var integer */ protected $code = 403; /** * Reason phrase * * @var string */ protected $reason = 'Forbidden'; } Http/Status404.php 0000644 00000000703 15111160361 0007702 0 ustar 00 <?php /** * Exception for 404 Not Found responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 404 Not Found responses * * @package Requests\Exceptions */ final class Status404 extends Http { /** * HTTP status code * * @var integer */ protected $code = 404; /** * Reason phrase * * @var string */ protected $reason = 'Not Found'; } Http/Status504.php 0000644 00000000725 15111160361 0007707 0 ustar 00 <?php /** * Exception for 504 Gateway Timeout responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 504 Gateway Timeout responses * * @package Requests\Exceptions */ final class Status504 extends Http { /** * HTTP status code * * @var integer */ protected $code = 504; /** * Reason phrase * * @var string */ protected $reason = 'Gateway Timeout'; } Http/Status410.php 0000644 00000000664 15111160361 0007705 0 ustar 00 <?php /** * Exception for 410 Gone responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 410 Gone responses * * @package Requests\Exceptions */ final class Status410 extends Http { /** * HTTP status code * * @var integer */ protected $code = 410; /** * Reason phrase * * @var string */ protected $reason = 'Gone'; } Http/Status402.php 0000644 00000000730 15111160361 0007700 0 ustar 00 <?php /** * Exception for 402 Payment Required responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 402 Payment Required responses * * @package Requests\Exceptions */ final class Status402 extends Http { /** * HTTP status code * * @var integer */ protected $code = 402; /** * Reason phrase * * @var string */ protected $reason = 'Payment Required'; } Http/Status412.php 0000644 00000000741 15111160361 0007703 0 ustar 00 <?php /** * Exception for 412 Precondition Failed responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 412 Precondition Failed responses * * @package Requests\Exceptions */ final class Status412 extends Http { /** * HTTP status code * * @var integer */ protected $code = 412; /** * Reason phrase * * @var string */ protected $reason = 'Precondition Failed'; } Http/Status428.php 0000644 00000001107 15111160361 0007707 0 ustar 00 <?php /** * Exception for 428 Precondition Required responses * * @link https://tools.ietf.org/html/rfc6585 * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 428 Precondition Required responses * * @link https://tools.ietf.org/html/rfc6585 * * @package Requests\Exceptions */ final class Status428 extends Http { /** * HTTP status code * * @var integer */ protected $code = 428; /** * Reason phrase * * @var string */ protected $reason = 'Precondition Required'; } Http/Status306.php 0000644 00000000714 15111160361 0007705 0 ustar 00 <?php /** * Exception for 306 Switch Proxy responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 306 Switch Proxy responses * * @package Requests\Exceptions */ final class Status306 extends Http { /** * HTTP status code * * @var integer */ protected $code = 306; /** * Reason phrase * * @var string */ protected $reason = 'Switch Proxy'; } Http/Status500.php 0000644 00000000747 15111160361 0007707 0 ustar 00 <?php /** * Exception for 500 Internal Server Error responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 500 Internal Server Error responses * * @package Requests\Exceptions */ final class Status500 extends Http { /** * HTTP status code * * @var integer */ protected $code = 500; /** * Reason phrase * * @var string */ protected $reason = 'Internal Server Error'; } Http/Status413.php 0000644 00000000760 15111160362 0007706 0 ustar 00 <?php /** * Exception for 413 Request Entity Too Large responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 413 Request Entity Too Large responses * * @package Requests\Exceptions */ final class Status413 extends Http { /** * HTTP status code * * @var integer */ protected $code = 413; /** * Reason phrase * * @var string */ protected $reason = 'Request Entity Too Large'; } Http/Status417.php 0000644 00000000736 15111160362 0007715 0 ustar 00 <?php /** * Exception for 417 Expectation Failed responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 417 Expectation Failed responses * * @package Requests\Exceptions */ final class Status417 extends Http { /** * HTTP status code * * @var integer */ protected $code = 417; /** * Reason phrase * * @var string */ protected $reason = 'Expectation Failed'; } Http/Status304.php 0000644 00000000714 15111160362 0007704 0 ustar 00 <?php /** * Exception for 304 Not Modified responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 304 Not Modified responses * * @package Requests\Exceptions */ final class Status304 extends Http { /** * HTTP status code * * @var integer */ protected $code = 304; /** * Reason phrase * * @var string */ protected $reason = 'Not Modified'; } Http/Status401.php 0000644 00000000714 15111160362 0007702 0 ustar 00 <?php /** * Exception for 401 Unauthorized responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 401 Unauthorized responses * * @package Requests\Exceptions */ final class Status401 extends Http { /** * HTTP status code * * @var integer */ protected $code = 401; /** * Reason phrase * * @var string */ protected $reason = 'Unauthorized'; } Http/Status505.php 0000644 00000000766 15111160362 0007716 0 ustar 00 <?php /** * Exception for 505 HTTP Version Not Supported responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 505 HTTP Version Not Supported responses * * @package Requests\Exceptions */ final class Status505 extends Http { /** * HTTP status code * * @var integer */ protected $code = 505; /** * Reason phrase * * @var string */ protected $reason = 'HTTP Version Not Supported'; } Http/Status406.php 0000644 00000000722 15111160362 0007706 0 ustar 00 <?php /** * Exception for 406 Not Acceptable responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 406 Not Acceptable responses * * @package Requests\Exceptions */ final class Status406 extends Http { /** * HTTP status code * * @var integer */ protected $code = 406; /** * Reason phrase * * @var string */ protected $reason = 'Not Acceptable'; } Http/Status407.php 0000644 00000000777 15111160362 0007721 0 ustar 00 <?php /** * Exception for 407 Proxy Authentication Required responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 407 Proxy Authentication Required responses * * @package Requests\Exceptions */ final class Status407 extends Http { /** * HTTP status code * * @var integer */ protected $code = 407; /** * Reason phrase * * @var string */ protected $reason = 'Proxy Authentication Required'; } Http/Status416.php 0000644 00000001005 15111160362 0007702 0 ustar 00 <?php /** * Exception for 416 Requested Range Not Satisfiable responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 416 Requested Range Not Satisfiable responses * * @package Requests\Exceptions */ final class Status416 extends Http { /** * HTTP status code * * @var integer */ protected $code = 416; /** * Reason phrase * * @var string */ protected $reason = 'Requested Range Not Satisfiable'; } Http/Status503.php 0000644 00000000741 15111160362 0007705 0 ustar 00 <?php /** * Exception for 503 Service Unavailable responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 503 Service Unavailable responses * * @package Requests\Exceptions */ final class Status503 extends Http { /** * HTTP status code * * @var integer */ protected $code = 503; /** * Reason phrase * * @var string */ protected $reason = 'Service Unavailable'; } Http/Status405.php 0000644 00000000736 15111160362 0007712 0 ustar 00 <?php /** * Exception for 405 Method Not Allowed responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 405 Method Not Allowed responses * * @package Requests\Exceptions */ final class Status405 extends Http { /** * HTTP status code * * @var integer */ protected $code = 405; /** * Reason phrase * * @var string */ protected $reason = 'Method Not Allowed'; } Http/Status411.php 0000644 00000000725 15111160362 0007705 0 ustar 00 <?php /** * Exception for 411 Length Required responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 411 Length Required responses * * @package Requests\Exceptions */ final class Status411 extends Http { /** * HTTP status code * * @var integer */ protected $code = 411; /** * Reason phrase * * @var string */ protected $reason = 'Length Required'; } Http/Status418.php 0000644 00000001054 15111160362 0007710 0 ustar 00 <?php /** * Exception for 418 I'm A Teapot responses * * @link https://tools.ietf.org/html/rfc2324 * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 418 I'm A Teapot responses * * @link https://tools.ietf.org/html/rfc2324 * * @package Requests\Exceptions */ final class Status418 extends Http { /** * HTTP status code * * @var integer */ protected $code = 418; /** * Reason phrase * * @var string */ protected $reason = "I'm A Teapot"; } Http/Status409.php 0000644 00000000700 15111160362 0007705 0 ustar 00 <?php /** * Exception for 409 Conflict responses * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 409 Conflict responses * * @package Requests\Exceptions */ final class Status409 extends Http { /** * HTTP status code * * @var integer */ protected $code = 409; /** * Reason phrase * * @var string */ protected $reason = 'Conflict'; } Http/Status511.php 0000644 00000001145 15111160362 0007703 0 ustar 00 <?php /** * Exception for 511 Network Authentication Required responses * * @link https://tools.ietf.org/html/rfc6585 * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 511 Network Authentication Required responses * * @link https://tools.ietf.org/html/rfc6585 * * @package Requests\Exceptions */ final class Status511 extends Http { /** * HTTP status code * * @var integer */ protected $code = 511; /** * Reason phrase * * @var string */ protected $reason = 'Network Authentication Required'; } Http/Status431.php 0000644 00000001145 15111160362 0007704 0 ustar 00 <?php /** * Exception for 431 Request Header Fields Too Large responses * * @link https://tools.ietf.org/html/rfc6585 * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 431 Request Header Fields Too Large responses * * @link https://tools.ietf.org/html/rfc6585 * * @package Requests\Exceptions */ final class Status431 extends Http { /** * HTTP status code * * @var integer */ protected $code = 431; /** * Reason phrase * * @var string */ protected $reason = 'Request Header Fields Too Large'; } Http/Status429.php 0000644 00000001163 15111160362 0007713 0 ustar 00 <?php /** * Exception for 429 Too Many Requests responses * * @link https://tools.ietf.org/html/draft-nottingham-http-new-status-04 * * @package Requests\Exceptions */ namespace WpOrg\Requests\Exception\Http; use WpOrg\Requests\Exception\Http; /** * Exception for 429 Too Many Requests responses * * @link https://tools.ietf.org/html/draft-nottingham-http-new-status-04 * * @package Requests\Exceptions */ final class Status429 extends Http { /** * HTTP status code * * @var integer */ protected $code = 429; /** * Reason phrase * * @var string */ protected $reason = 'Too Many Requests'; } InvalidResourceException.php 0000644 00000000755 15111161216 0012234 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * Thrown when a resource cannot be loaded. * * @author Fabien Potencier <fabien@symfony.com> */ class InvalidResourceException extends \InvalidArgumentException implements ExceptionInterface { } MissingRequiredOptionException.php 0000644 00000001234 15111161216 0013432 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * @author Oskar Stark <oskarstark@googlemail.com> */ class MissingRequiredOptionException extends IncompleteDsnException { public function __construct(string $option, string $dsn = null, \Throwable $previous = null) { $message = sprintf('The option "%s" is required but missing.', $option); parent::__construct($message, $dsn, $previous); } } ExceptionInterface.php 0000644 00000000725 15111161217 0011034 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * Exception interface for all exceptions thrown by the component. * * @author Fabien Potencier <fabien@symfony.com> */ interface ExceptionInterface extends \Throwable { } ProviderException.php 0000644 00000002002 15111161217 0010714 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; use Symfony\Contracts\HttpClient\ResponseInterface; /** * @author Fabien Potencier <fabien@symfony.com> */ class ProviderException extends RuntimeException implements ProviderExceptionInterface { private ResponseInterface $response; private string $debug; public function __construct(string $message, ResponseInterface $response, int $code = 0, \Exception $previous = null) { $this->response = $response; $this->debug = $response->getInfo('debug') ?? ''; parent::__construct($message, $code, $previous); } public function getResponse(): ResponseInterface { return $this->response; } public function getDebug(): string { return $this->debug; } } LogicException.php 0000644 00000000747 15111161217 0010175 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * Base LogicException for Translation component. * * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> */ class LogicException extends \LogicException implements ExceptionInterface { } ProviderExceptionInterface.php 0000644 00000001057 15111161217 0012546 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * @author Fabien Potencier <fabien@symfony.com> */ interface ProviderExceptionInterface extends ExceptionInterface { /* * Returns debug info coming from the Symfony\Contracts\HttpClient\ResponseInterface */ public function getDebug(): string; } RuntimeException.php 0000644 00000000761 15111161220 0010551 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * Base RuntimeException for the Translation component. * * @author Abdellatif Ait boudad <a.aitboudad@gmail.com> */ class RuntimeException extends \RuntimeException implements ExceptionInterface { } NotFoundResourceException.php 0000644 00000000754 15111161220 0012374 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; /** * Thrown when a resource does not exist. * * @author Fabien Potencier <fabien@symfony.com> */ class NotFoundResourceException extends \InvalidArgumentException implements ExceptionInterface { } IncompleteDsnException.php 0000644 00000001164 15111161221 0011671 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; class IncompleteDsnException extends InvalidArgumentException { public function __construct(string $message, string $dsn = null, \Throwable $previous = null) { if ($dsn) { $message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message; } parent::__construct($message, 0, $previous); } } UnsupportedSchemeException.php 0000644 00000003550 15111161221 0012603 0 ustar 00 <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Translation\Exception; use Symfony\Component\Translation\Bridge; use Symfony\Component\Translation\Provider\Dsn; class UnsupportedSchemeException extends LogicException { private const SCHEME_TO_PACKAGE_MAP = [ 'crowdin' => [ 'class' => Bridge\Crowdin\CrowdinProviderFactory::class, 'package' => 'symfony/crowdin-translation-provider', ], 'loco' => [ 'class' => Bridge\Loco\LocoProviderFactory::class, 'package' => 'symfony/loco-translation-provider', ], 'lokalise' => [ 'class' => Bridge\Lokalise\LokaliseProviderFactory::class, 'package' => 'symfony/lokalise-translation-provider', ], ]; public function __construct(Dsn $dsn, string $name = null, array $supported = []) { $provider = $dsn->getScheme(); if (false !== $pos = strpos($provider, '+')) { $provider = substr($provider, 0, $pos); } $package = self::SCHEME_TO_PACKAGE_MAP[$provider] ?? null; if ($package && !class_exists($package['class'])) { parent::__construct(sprintf('Unable to synchronize translations via "%s" as the provider is not installed. Try running "composer require %s".', $provider, $package['package'])); return; } $message = sprintf('The "%s" scheme is not supported', $dsn->getScheme()); if ($name && $supported) { $message .= sprintf('; supported schemes for translation provider "%s" are: "%s"', $name, implode('", "', $supported)); } parent::__construct($message.'.'); } }