From 12cf83a8430655a33e0bf2f5871a28694d08f9d9 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 14 Jul 2023 09:36:10 -0500 Subject: [PATCH] Rename SeException class to AppException --- lib/Exceptions/AppException.php | 5 +++++ lib/Exceptions/EbookParsingException.php | 2 +- lib/Exceptions/InvalidAuthorException.php | 2 +- lib/Exceptions/InvalidCaptchaException.php | 2 +- lib/Exceptions/InvalidCollectionException.php | 2 +- lib/Exceptions/InvalidCredentialsException.php | 2 +- lib/Exceptions/InvalidEbookException.php | 2 +- lib/Exceptions/InvalidEmailException.php | 2 +- lib/Exceptions/InvalidFileException.php | 2 +- lib/Exceptions/InvalidNewsletterSubscriptionException.php | 2 +- lib/Exceptions/InvalidPatronException.php | 2 +- lib/Exceptions/InvalidPermissionsException.php | 2 +- lib/Exceptions/InvalidPollException.php | 2 +- lib/Exceptions/InvalidPollItemException.php | 2 +- lib/Exceptions/InvalidPollVoteException.php | 2 +- lib/Exceptions/InvalidRequestException.php | 2 +- lib/Exceptions/InvalidSessionException.php | 2 +- lib/Exceptions/InvalidUserException.php | 2 +- lib/Exceptions/LoginRequiredException.php | 2 +- lib/Exceptions/NewsletterRequiredException.php | 2 +- lib/Exceptions/NewsletterSubscriptionExistsException.php | 2 +- lib/Exceptions/NoopException.php | 2 +- lib/Exceptions/PaymentExistsException.php | 2 +- lib/Exceptions/PollClosedException.php | 2 +- lib/Exceptions/PollItemRequiredException.php | 2 +- lib/Exceptions/PollVoteExistsException.php | 2 +- lib/Exceptions/SeException.php | 5 ----- lib/Exceptions/SeeOtherEbookException.php | 2 +- lib/Exceptions/UserExistsException.php | 2 +- lib/Exceptions/ValidationException.php | 2 +- lib/Exceptions/WebhookException.php | 2 +- lib/Library.php | 6 +++--- www/newsletter/subscriptions/get.php | 2 +- www/newsletter/subscriptions/post.php | 2 +- www/polls/get.php | 4 ++-- www/polls/votes/get.php | 2 +- www/polls/votes/index.php | 2 +- www/polls/votes/post.php | 2 +- www/sessions/post.php | 2 +- 39 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 lib/Exceptions/AppException.php delete mode 100644 lib/Exceptions/SeException.php diff --git a/lib/Exceptions/AppException.php b/lib/Exceptions/AppException.php new file mode 100644 index 00000000..3b0219db --- /dev/null +++ b/lib/Exceptions/AppException.php @@ -0,0 +1,5 @@ +UrlName, $GLOBALS['User']->UserId); } - catch(Exceptions\SeException){ + catch(Exceptions\AppException){ // User has already voted $canVote = true; } } } -catch(Exceptions\SeException){ +catch(Exceptions\AppException){ Template::Emit404(); } diff --git a/www/polls/votes/get.php b/www/polls/votes/get.php index 20d52c58..a6d8c8dd 100644 --- a/www/polls/votes/get.php +++ b/www/polls/votes/get.php @@ -17,7 +17,7 @@ try{ session_unset(); } } -catch(Exceptions\SeException){ +catch(Exceptions\AppException){ Template::Emit404(); } diff --git a/www/polls/votes/index.php b/www/polls/votes/index.php index 284fad64..d8580944 100644 --- a/www/polls/votes/index.php +++ b/www/polls/votes/index.php @@ -6,7 +6,7 @@ $poll = new Poll(); try{ $poll = Poll::GetByUrlName(HttpInput::Str(GET, 'pollurlname', false)); } -catch(Exceptions\SeException){ +catch(Exceptions\AppException){ Template::Emit404(); } diff --git a/www/polls/votes/post.php b/www/polls/votes/post.php index 9fea1ad9..250891bb 100644 --- a/www/polls/votes/post.php +++ b/www/polls/votes/post.php @@ -33,7 +33,7 @@ try{ header('Location: ' . $vote->Url); } } -catch(Exceptions\SeException $ex){ +catch(Exceptions\AppException $ex){ // Validation failed if($requestType == WEB){ $_SESSION['vote'] = $vote; diff --git a/www/sessions/post.php b/www/sessions/post.php index 3a58876e..1f973f6f 100644 --- a/www/sessions/post.php +++ b/www/sessions/post.php @@ -34,7 +34,7 @@ try{ header('Location: ' . $session->Url); } } -catch(Exceptions\SeException $ex){ +catch(Exceptions\AppException $ex){ // Login failed if($requestType == WEB){ $_SESSION['email'] = $email;