[EXCEPTION] Add base class to invalid form exception and add URL arguments to redirect exception

This commit is contained in:
Hugo Sales 2020-09-10 20:44:03 +00:00 committed by Hugo Sales
parent 0e332b718e
commit c07a0cdcd5
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@
namespace App\Util\Exception;
class InvalidFormException
class InvalidFormException extends ClientException
{
public function __construct()
{

View File

@ -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);
}