php - ErrorHandling in Yii -


i have developed web application using yii, can't rich error handling solution.

this code

config/main.php

'components'=>array(    'errorhandler'=>array(         // use 'site/error' action display errors         'erroraction'=>'site/error',     ), ), 

sitecontroller

public function actionerror() {      if($error=yii::app()->errorhandler->error)     {         if(yii::app()->request->isajaxrequest)         {             echo $error['message'];          }         else             $this->render('error', array('error'=>$error));     } } 

then not work

showing

showing

how can reach solution?

this problem solved itself.

how solved problem

add error function on inside accessrules function

and comment config/main.php

/* array(     'class'=>'cweblogroute',     'enabled'=>defined('yii_debug'),   ), */ 

that's

hope


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -