BackendController::actionError PHP Method

actionError() public method

public actionError ( )
    public function actionError()
    {
        $error = Yii::app()->getErrorHandler()->error;
        if (empty($error) || !isset($error['code']) || !(isset($error['message']) || isset($error['msg']))) {
            $this->redirect(['index']);
        }
        if (!Yii::app()->getRequest()->getIsAjaxRequest()) {
            $this->render('error', ['error' => $error]);
        }
    }