mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-21 23:46:54 +01:00
when YII_DEBUG -> exception, else log LEVEL_WARNING
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user