when YII_DEBUG -> exception, else log LEVEL_WARNING

This commit is contained in:
Alexander Pletnev
2014-06-03 16:39:18 +04:00
parent 445c89cfb4
commit 8a000b56bb

View File

@@ -593,11 +593,14 @@ class CClientScript extends CApplicationComponent
$this->hasScripts=true;
$params=func_get_args();
$this->recordCachingAction('clientScript','registerCoreScript',$params);
} else {
if(YII_DEBUG)
{
Yii::log('There is no package: '.$name, CLogger::LEVEL_WARNING, 'system.web.CClientScript');
}
}
elseif(YII_DEBUG)
{
throw new CException('There is no ClientScript package: '.$name);
}
else
{
Yii::log('There is no ClientScript package: '.$name, CLogger::LEVEL_WARNING, 'system.web.CClientScript');
}
return $this;
}