framework/base/CErrorHandler.php
protected function getViewFile($view,$code)
	{
		$viewPaths=array(
			Yii::app()->getTheme()===null ? null :  Yii::app()->getTheme()->getSystemViewPath(),
			Yii::app() instanceof CWebApplication ? Yii::app()->getSystemViewPath() : null,
			YII_PATH.DIRECTORY_SEPARATOR.'views',
		);

		foreach($viewPaths as $i=>$viewPath)
		{
			if($viewPath!==null)
			{
				 $viewFile=$this->getViewFileInternal($viewPath,$view,$code,$i===2?'en_us':null);
				 if(is_file($viewFile))
				 	 return $viewFile;
			}
		}
	}
protected function getViewFile($view,$code)
	{
		$viewPaths=array(
			Yii::app()->getTheme()===null ? null :  Yii::app()->getTheme()->getSystemViewPath(),
			Yii::app() instanceof CWebApplication ? Yii::app()->getSystemViewPath() : null,
			YII_PATH.DIRECTORY_SEPARATOR.'views',
		);

		foreach($viewPaths as $i=>$viewPath)
		{
			if($viewPath!==null)
			{
				 $viewFile=$this->getViewFileInternal($viewPath,$view,$code,$i===2?'en_us':null);
				 if(is_file($viewFile))
				 	 return $viewFile;
			}
		}
	}
protected function getViewFile ( $ view , $ code ) { $ viewPaths = array ( Yii :: app ( ) -> getTheme ( ) === null ? null : Yii :: app ( ) -> getTheme ( ) -> getSystemViewPath ( ) , Yii :: app ( ) instanceof CWebApplication ? Yii :: app ( ) -> getSystemViewPath ( ) : null , YII_PATH . DIRECTORY_SEPARATOR . 'views' , ) ; foreach ( $ viewPaths as $ i => $ viewPath ) { if ( $ viewPath !== null ) { $ viewFile = $ this -> getViewFileInternal ( $ viewPath , $ view , $ code , $ i === 2 ? 'en_us' : null ) ; if ( is_file ( $ viewFile ) ) return $ viewFile ; } } }
Determines which view file should be used.
@param string $view view name (either 'exception' or 'error')
@param integer $code HTTP status code
@return string view file path
Determines which view file should be used .