protected function _actionException(AnCommandContext $context)
    {
        $viewer = $this->getService('com:people.viewer');

        if ($viewer->guest() && $context->data instanceof LibBaseControllerExceptionUnauthorized) {
            $this->getController()->setMessage('COM-PEOPLE-PLEASE-LOGIN-TO-SEE');
            $return = base64_encode(AnRequest::url());
            $context->response->setRedirect(route('option=com_people&view=session&return='.$return));
            $context->response->send();
            exit(0);

        } else {
            $this->getService('application.dispatcher')->execute('exception', $context);
        }
    }
protected function _actionException(AnCommandContext $context)
    {
        $viewer = $this->getService('com:people.viewer');

        if ($viewer->guest() && $context->data instanceof LibBaseControllerExceptionUnauthorized) {
            $this->getController()->setMessage('COM-PEOPLE-PLEASE-LOGIN-TO-SEE');
            $return = base64_encode(AnRequest::url());
            $context->response->setRedirect(route('option=com_people&view=session&return='.$return));
            $context->response->send();
            exit(0);

        } else {
            $this->getService('application.dispatcher')->execute('exception', $context);
        }
    }
protected function _actionException ( AnCommandContext $ context ) { $ viewer = $ this -> getService ( 'com:people.viewer' ) ; if ( $ viewer -> guest ( ) && $ context -> data instanceof LibBaseControllerExceptionUnauthorized ) { $ this -> getController ( ) -> setMessage ( 'COM-PEOPLE-PLEASE-LOGIN-TO-SEE' ) ; $ return = base64_encode ( AnRequest :: url ( ) ) ; $ context -> response -> setRedirect ( route ( 'option=com_people&view=session&return=' . $ return ) ) ; $ context -> response -> send ( ) ; exit ( 0 ) ; } else { $ this -> getService ( 'application.dispatcher' ) -> execute ( 'exception' , $ context ) ; } }
Allows the component to handle exception. By default this
action passes the exception to the application exception handler.

@param AnCommandContext $context Command context
Allows the component to handle exception . By default this action passes the exception to the application exception handler .