i am developing one application with iphone & Yii framework(PHP Server side), i have implemented Roll based access control (RBAC), When user logged in through iphone and performs the delete operation for which he is unauthorized Yii throws an 403 exception error, my question here is how we can change this default message, and is there any way in which we can set JSON array for this kind of exception error.
Please help in this..
WebApplication generates
onExceptionevent each time an exception is being handled. You can handle this event. I have done it using the behavior, which must be attached to the Yii application.onExceptionhandler receives CExceptionEvent argument, which contains CExceptionEvent::$exception property. Study the CExceptionEvent class reference.In the
onExceptionhandler you can send any data in any format you need to the client.