public function actionError()
	{
		$response = array();
		$this->message = Yii::t('Api.Controller', 'An unexpected error occured.');
		if ($error=Yii::app()->errorHandler->error)
		{
			$this->status = $error['code'];
			$this->message = $error['message'];
			if (YII_DEBUG)
				$response = $error;
		
		}

		return $this->renderOutput($response);
	}
public function actionError()
	{
		$response = array();
		$this->message = Yii::t('Api.Controller', 'An unexpected error occured.');
		if ($error=Yii::app()->errorHandler->error)
		{
			$this->status = $error['code'];
			$this->message = $error['message'];
			if (YII_DEBUG)
				$response = $error;
		
		}

		return $this->renderOutput($response);
	}
public function actionError ( ) { $ response = array ( ) ; $ this -> message = Yii :: t ( 'Api.Controller' , 'An unexpected error occured.' ) ; if ( $ error = Yii :: app ( ) -> errorHandler -> error ) { $ this -> status = $ error [ 'code' ] ; $ this -> message = $ error [ 'message' ] ; if ( YII_DEBUG ) $ response = $ error ; } return $ this -> renderOutput ( $ response ) ; }
Default Error Handler. Yii automatically magics the response when renderOutput is called. This just updates the necessary components for us
Default Error Handler . Yii automatically magics the response when renderOutput is called . This just updates the necessary components for us