framework/base/CErrorHandler.php
protected function getViewFileInternal($viewPath,$view,$code,$srcLanguage=null)
	{
		$app=Yii::app();
		if($view==='error')
		{
			$viewFile=$app->findLocalizedFile($viewPath.DIRECTORY_SEPARATOR."error{$code}.php",$srcLanguage);
			if(!is_file($viewFile))
				$viewFile=$app->findLocalizedFile($viewPath.DIRECTORY_SEPARATOR.'error.php',$srcLanguage);
		}
		else
			$viewFile=$viewPath.DIRECTORY_SEPARATOR."exception.php";
		return $viewFile;
	}
protected function getViewFileInternal($viewPath,$view,$code,$srcLanguage=null)
	{
		$app=Yii::app();
		if($view==='error')
		{
			$viewFile=$app->findLocalizedFile($viewPath.DIRECTORY_SEPARATOR."error{$code}.php",$srcLanguage);
			if(!is_file($viewFile))
				$viewFile=$app->findLocalizedFile($viewPath.DIRECTORY_SEPARATOR.'error.php',$srcLanguage);
		}
		else
			$viewFile=$viewPath.DIRECTORY_SEPARATOR."exception.php";
		return $viewFile;
	}
protected function getViewFileInternal ( $ viewPath , $ view , $ code , $ srcLanguage = null ) { $ app = Yii :: app ( ) ; if ( $ view === 'error' ) { $ viewFile = $ app -> findLocalizedFile ( $ viewPath . DIRECTORY_SEPARATOR . "error{$code}.php" , $ srcLanguage ) ; if ( ! is_file ( $ viewFile ) ) $ viewFile = $ app -> findLocalizedFile ( $ viewPath . DIRECTORY_SEPARATOR . 'error.php' , $ srcLanguage ) ; } else $ viewFile = $ viewPath . DIRECTORY_SEPARATOR . "exception.php" ; return $ viewFile ; }
Looks for the view under the specified directory.
@param string $viewPath the directory containing the views
@param string $view view name (either 'exception' or 'error')
@param integer $code HTTP status code
@param string $srcLanguage the language that the view file is in
@return string view file path
Looks for the view under the specified directory .