Squashed commit message
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
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
This commit is contained in:
28
backend/src/app/Exceptions/OrderValidationFailedException.php
Executable file
28
backend/src/app/Exceptions/OrderValidationFailedException.php
Executable file
@@ -0,0 +1,28 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user