What errors do you want to display to the user, while running in
production mode?

That being asked, you might take a look here on how to handle this
situation:
http://teknoid.wordpress.com/2008/08/29/dealing-with-errors-in-cakephp/



On Feb 6, 11:54 am, maxmil <[email protected]> wrote:
> I have found the same problem.
>
> Is this really deliberate?
>
> It takes quite a bit of power away from the cakephp errorHandling
> mechanism if it is and is very naughty not to mention it in the error
> handling pages of the manual!
>
> My solution has been to use:
>
> $this->render('/errors/custom_error');
>
> instead invoking $this->cakeError.
>
> On Jan 16, 11:55 am, ianh <[email protected]> wrote:
>
> > Hmm. Just found the same thing. Seems to be to do with lines 110 to
> > 117 in core error.php __construct method
> > if ($method !== 'error') {
> >         if (Configure::read() == 0) {
> >                 $method = 'error404';
> >                 if (isset($code) && $code == 500) {
> >                         $method = 'error500';
> >                 }
> >         }
>
> > }
>
> > So if you trigger cakeError with a method like 'test' then that works
> > fine unless Configure::read() (which seems to return debug by default)
> > is 0 then it gets reset. So you can create a custom method in
> > app_error called 'error' and that will work regardless of debug level,
> > but any custom errors will only work when debug is > 0.
>
> > The code suggests this is intended but the book doesnt make any
> > reference to it. Also the tests dont shed any light as of course tests
> > cannot be run when debug is 0! Does anybody know what the intention
> > behind this is please?
>
> > Anyway, as Mike says above, the solution Im now using is to include a
> > Configure::write('debug', 1); line wherever I call cakeError for a
> > custom method.
>
> > Thx, ianh
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to