Exception Error

How to handle sql custom error message ( raiserror ) in yii framework with linux os. Now Yii throw that message as php warning. How to over come this error

this is my code

$sql = "[sp_Language] :Language_Code, :Language_Name, :Active, :Disp_Order, :Action ";

   $command = $this->createCommand($sql);


   $command->bindParam(":Language_Code",    $languageCode,  PDO::PARAM_INT);


   $command->bindParam(":Language_Name",	$language,		PDO::PARAM_STR);


   $command->bindParam(":Active",			$active,		PDO::PARAM_STR);


   $command->bindParam(":Disp_Order",	  	$displayOrder,	PDO::PARAM_INT);	 	   


   $command->bindParam(":Action",			$action,		PDO::PARAM_INT);


   	try 


	{	


	$this->msg = '';	   


	$command->queryAll();


  	}


   	catch(CDbException $ex) 


	{


		$this->msg = substr($ex->errorInfo[2],0,-30);


		//throw new ExceptionClass('tet');


		


	}   

Thanks in advance

Any one help me am new one in yii frame

Hi,

Don’t know actually is there any way to get rid of this.But how I handle those exceptions from the php function set_error_handler

EG:




$old_error_handler = set_error_handler(array('ClassName', 'handleErrors'));


try

{

	if (.................)

	{

		..............................

		..............................

	}

	else

	{

		..............................

		..............................

	}


	............................


	if ($model->save())	

	{

		..............................

	}

}

catch (CDbException $ex)

{

         ..................................

	throw new Exception(".....................");

}

catch (Exception $ex)

{

	....................

 	throw new Exception($ex->getMessage(), $ex->getCode());

}




set_error_handler($old_error_handler);

Have you read the guide:

http://www.yiiframew…en/topics.error ?

Usually, all you need is to d[size="2"]isable debug mode in production environment[/size]

and to use something like




        'errorHandler' => array(

            'errorAction' => (YII_DEBUG ? null : 'site/error'),

        ),



in your config file to handle error in a desired method.