protected function handleBadUserRoleException(GetResponseForExceptionEvent $event, BadUserRoleException $ex) {
        if (null !== $ex->getRedirectUrl()) {
            $event->setResponse(new RedirectResponse($ex->getRedirectUrl()));
        }
        return $event;
    }
protected function handleBadUserRoleException(GetResponseForExceptionEvent $event, BadUserRoleException $ex) {
        if (null !== $ex->getRedirectUrl()) {
            $event->setResponse(new RedirectResponse($ex->getRedirectUrl()));
        }
        return $event;
    }
protected function handleBadUserRoleException ( GetResponseForExceptionEvent $ event , BadUserRoleException $ ex ) { if ( null !== $ ex -> getRedirectUrl ( ) ) { $ event -> setResponse ( new RedirectResponse ( $ ex -> getRedirectUrl ( ) ) ) ; } return $ event ; }
Handle a bad user role exception.

@param GetResponseForExceptionEvent $event The event.
@param BadUserRoleException $ex The exception.
@return GetResponseForExceptionEvent Returns the event.
Handle a bad user role exception .