Use default PHP error handler


Im trying make custom error handling using TRY / CATCH with memcache, but memcache throws an instance of EXCEPTION and YII show a custom page for the error, but i want make custom code on CATCH while get memcache error. How to do it on YII?

The same on database, im trying make custom CATCH code for make a rollback.

And i can have more exception that i want make custom way to CATCH code, how i can do it with YII?

defining in your index file


will disable Yii exception handler for the whole application…

using try catch will prevent Yii from throw an exception for a piece of code

Is possible disable for only one part of code and after my code enable again?




}catch(Exception $e){

  Yii::log($e->getMessage(), CLogger::LEVEL_ERROR);