From f792136c261acf7e10f00aa31ef33715adf3a931 Mon Sep 17 00:00:00 2001 From: Ceeram Date: Thu, 27 Dec 2012 13:18:52 +0100 Subject: [PATCH] adding a note about custom error handler classes --- app/Config/core.php | 4 +++- lib/Cake/Console/Templates/skel/Config/core.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Config/core.php b/app/Config/core.php index 99198539f5d..e0527538d41 100644 --- a/app/Config/core.php +++ b/app/Config/core.php @@ -42,7 +42,8 @@ * Options: * * - `handler` - callback - The callback to handle errors. You can set this to any callable type, - * including anonymous functions. + * including anonymous functions. + * Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class * - `level` - int - The level of errors you are interested in capturing. * - `trace` - boolean - Include stack traces for errors in log files. * @@ -64,6 +65,7 @@ * * - `handler` - callback - The callback to handle exceptions. You can set this to any callback type, * including anonymous functions. + * Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you * should place the file for that class in app/Lib/Error. This class needs to implement a render method. * - `log` - boolean - Should Exceptions be logged? diff --git a/lib/Cake/Console/Templates/skel/Config/core.php b/lib/Cake/Console/Templates/skel/Config/core.php index 7720e9ed686..14ad6976ba5 100644 --- a/lib/Cake/Console/Templates/skel/Config/core.php +++ b/lib/Cake/Console/Templates/skel/Config/core.php @@ -42,7 +42,8 @@ * Options: * * - `handler` - callback - The callback to handle errors. You can set this to any callable type, - * including anonymous functions. + * including anonymous functions. + * Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class * - `level` - int - The level of errors you are interested in capturing. * - `trace` - boolean - Include stack traces for errors in log files. * @@ -64,6 +65,7 @@ * * - `handler` - callback - The callback to handle exceptions. You can set this to any callback type, * including anonymous functions. + * Make sure you add App::uses('MyHandler', 'Error'); when using a custom handler class * - `renderer` - string - The class responsible for rendering uncaught exceptions. If you choose a custom class you * should place the file for that class in app/Lib/Error. This class needs to implement a render method. * - `log` - boolean - Should Exceptions be logged?