On Jan/02, Will wrote:
> Hi all,
> 
> I'm looking for a way to return a generic error every time something
> goes wrong with a REST request.  So for example, I would like to
> return a simple, XML response like:
> 
> <error>
> There was a problem processing your request.
> </error>
> 
> Anytime something goes wrong when something is accessed via REST (e.g.
> the template is in the View/$ControllerName/xml folder) but NOT when
> the page is accessed normally (the template is in the View/
> $ControllerName/ folder).  Is there way way to do this in Cake?  Or
> perhaps a smarter way to achieve similar functionality?

What about install a custom exception handler which outputs your formatted
message on screen? This ways you will be able to handle both core and custom
exceptions so that they are rendered as you whish.


Regards,
Matteo

> 
> Thanks,
> 
> -Will
> 
> -- 
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org 
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
> 
> 
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php
> 

-- 
http://www.matteolandi.net

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to