Some checks failed
Telegram Mini App Shop Builder / Compute version metadata (push) Has been cancelled
Telegram Mini App Shop Builder / Run Frontend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run Backend tests (push) Has been cancelled
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Has been cancelled
Telegram Mini App Shop Builder / Build module. (push) Has been cancelled
Telegram Mini App Shop Builder / release (push) Has been cancelled
29 lines
588 B
PHP
Executable File
29 lines
588 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use Openguru\OpenCartFramework\Validator\ErrorBag;
|
|
use RuntimeException;
|
|
use Throwable;
|
|
|
|
class OrderValidationFailedException extends RuntimeException
|
|
{
|
|
private ErrorBag $errorBag;
|
|
|
|
public function __construct(
|
|
ErrorBag $errorBag,
|
|
string $message = 'Validation failed',
|
|
int $code = 422,
|
|
Throwable $previous = null
|
|
) {
|
|
$this->errorBag = $errorBag;
|
|
|
|
parent::__construct($message, $code, $previous);
|
|
}
|
|
|
|
public function getErrorBag(): ErrorBag
|
|
{
|
|
return $this->errorBag;
|
|
}
|
|
}
|