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;