Re: How to get Cake to log error?
usually logging is enabled when debug mode is not on.
try to set debug to 0 and check for log entries then
Am Freitag, 9. November 2012 15:13:51 UTC+1 schrieb Daniel:
I've got some exception code as follows:try {
if ($this->hashCaptcha(strtolower($this->request-> data['User']['code'])) != $this->Session->read('user_captcha_code'))
throw new Exception('Incorrect captcha code. Please, try again!');
...}catch(Exception $e) {
$this->Session->setFlash(__($e->getMessage())); }How to get Cake to log the error aswell as display the flash message?I tried:$this->cakeError('AddUserError', array('message' => $e->getMessage()));
... but that just caused "Internal Error" to be displayed.Thanks.
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
---
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+unsubscribe@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home