I followed the documentation exactly in the book, specifically
(http://book.cakephp.org/2.0/en/development/exceptions.html#built-in-exceptions)...
<?php
// in app/config/core.php
Configure::write('Exception.handler', 'AppExceptionHandler::handle');
// in app/config/bootstrap.php
App::uses('AppExceptionHandler', 'Lib');
// in app/Lib/AppExceptionHandler.php
class AppExceptionHandler {
public static function handle($error) {
echo 'Oh noes! ' . $error->getMessage();
$this->sendEmail();
}
...
}
And it gives you this error : Fatal error: Using $this when not in object
context in C:\wamp\www\zuha\app\Lib\AppExceptionHandler.php on line *9*
This is causing other problems too, in that I think its stopping the
application from finding AppExceptionRenderer (explained in the same book
page).
--
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