Hi All
How can I get the error details of a failed save call into a local
variable? Here is basically what I'm trying to do in controller, what
can I use for <variable with error details> so I can send the error
details back to client?
function save()
{
$this->layout = 'json';
$aResult = array();
if ($this->Bond->save($this->data)) {
$aResult['success'] = true;
$aResult['data'] = array('Bond application succesfully
saved...');
} else {
$aResult['success'] = false;
$aResult['data'] = array(<variable with error details>);
}
$this->set('sResult', $this->json->encode($aResult));
$this->render('json/response');
}
Any help appreciated!
Cheers
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---