- } catch (Exception $exception) {
- if ($exception instanceof UserTokenNotFoundException) {
- $this->showErrorNotification(trans('errors.email_confirmation_invalid'));
- return redirect('/register');
- }
-
- if ($exception instanceof UserTokenExpiredException) {
- $user = $this->userRepo->getById($exception->userId);
- $this->emailConfirmationService->sendConfirmation($user);
- $this->showErrorNotification(trans('errors.email_confirmation_expired'));
- return redirect('/register/confirm');
- }
-
- throw $exception;
+ } catch (UserTokenNotFoundException $exception) {
+ $this->showErrorNotification(trans('errors.email_confirmation_invalid'));
+
+ return redirect('/register');
+ } catch (UserTokenExpiredException $exception) {
+ $user = $this->userRepo->getById($exception->userId);
+ $this->emailConfirmationService->sendConfirmation($user);
+ $this->showErrorNotification(trans('errors.email_confirmation_expired'));
+
+ return redirect('/register/confirm');