vendor/api-platform/core/src/Validator/Exception/ValidationException.php line 25

  1. <?php
  2. /*
  3.  * This file is part of the API Platform project.
  4.  *
  5.  * (c) Kévin Dunglas <dunglas@gmail.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace ApiPlatform\Validator\Exception;
  12. use ApiPlatform\Metadata\Exception\RuntimeException;
  13. /**
  14.  * Thrown when a validation error occurs.
  15.  *
  16.  * @author Kévin Dunglas <dunglas@gmail.com>
  17.  */
  18. class ValidationException extends RuntimeException
  19. {
  20.     public function __construct(string $message ''int $code 0\Throwable $previous null, protected readonly ?string $errorTitle null)
  21.     {
  22.         parent::__construct($message$code$previous);
  23.     }
  24.     public function getErrorTitle(): ?string
  25.     {
  26.         return $this->errorTitle;
  27.     }
  28. }