[EXCEPTION] Add base class to invalid form exception and add URL arguments to redirect exception
This commit is contained in:
parent
0e332b718e
commit
c07a0cdcd5
@ -21,7 +21,7 @@
|
||||
|
||||
namespace App\Util\Exception;
|
||||
|
||||
class InvalidFormException
|
||||
class InvalidFormException extends ClientException
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
|
@ -27,10 +27,10 @@ class RedirectException extends Exception
|
||||
{
|
||||
public ?RedirectResponse $redirect_response = null;
|
||||
|
||||
public function __construct(string $url_id = '', $message = '', $code = 302, Exception $previous_exception = null)
|
||||
public function __construct(string $url_id = '', array $args = [], $message = '', $code = 302, Exception $previous_exception = null)
|
||||
{
|
||||
if (!empty($url_id)) {
|
||||
$this->redirect_response = new RedirectResponse(Router::url($urlid));
|
||||
$this->redirect_response = new RedirectResponse(Router::url($url_id, $args));
|
||||
}
|
||||
parent::__construct($message, $code, $previous_exception);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user