All you need to do is check that you got something back from the
saveAll, so you wrap it like:

if ($this->User->saveAll($this->data)){
   -- success
   }
else {
   -- failure
  }

Then you can look at the error data in the failure section ...

On Dec 17, 10:16 am, Rob Wilkerson <r...@robwilkerson.org> wrote:
> Today, I wrote my first code to saveAll() from form input and, knowing
> I probably didn't do it right the first time, I wrapped my save
> attempt in a try/catch block. Imagine my surprise when everything
> returned success messages, but nothing actually got saved.  A look at
> the source indicated that exceptions aren't being thrown which I
> assume is due to PHP4.x compatibility issues.
>
> Since I can't use try/catch, what's the "cake way" to catch
> exceptions? I see the "Error Handling" section in the docs, but do I
> really need to write a custom error handler just to determine that an
> error occurred? I see how to "throw" an error using $this->cakeError
> (), but it seems like there has to be some built-in capability to
> catch them; I'm just not seeing it.
>
> Thanks.
>
> Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to