Adding basic configuration for Error and Exception handling.

This commit is contained in:
mark_story 2010-11-14 20:42:48 -05:00
parent a8ba73da62
commit 561fe7b91f

View file

@ -50,6 +50,25 @@
*/ */
Configure::write('log', true); Configure::write('log', true);
/**
* Configure the Error handler used to handle errors for your application. By default
* ErrorHandler::handleError() is used. It will display errors using Debugger, when debug > 0
* and log errors with CakeLog when debug = 0. You can set it to any static method that is built to handle
* errors.
*/
Configure::write('Error', array(
'handler' => 'ErrorHandler::handleError',
));
/**
* Configure the default Exception handler. This method will be invoked each time there is an uncaught exception
* by default, ErrorHandler::handleException() is used. It will display a HTML page for the exception, and
* while debug > 0, framework errors like Missing Controller will be displayed.
*/
Configure::write('Exception', array(
'handler' => 'ErrorHandler::handleException'
));
/** /**
* Application wide charset encoding * Application wide charset encoding
*/ */