Skip to content

Instantly share code, notes, and snippets.

@allyraza
Created August 13, 2012 07:13
Show Gist options
  • Save allyraza/3337665 to your computer and use it in GitHub Desktop.
Save allyraza/3337665 to your computer and use it in GitHub Desktop.
public function actionError()
{
if($error=Yii::app()->errorHandler->error)
{
if(Yii::app()->request->isAjaxRequest)
echo $error['message'];
else
$this->render('error', $error);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment