From 284a8db3f41d7a13ddb8440ecb7ab74a75d6d340 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 28 Nov 2010 12:27:51 -0500 Subject: [PATCH] Moving error handling classes into a separate directory. Moving error handling test cases into a directory that matches the one in libs. Updating imports. --- cake/bootstrap.php | 4 ++-- cake/libs/{ => error}/error_handler.php | 2 +- cake/libs/{ => error}/exception_renderer.php | 0 cake/libs/{ => error}/exceptions.php | 0 cake/tests/cases/libs/all_error.test.php | 4 ++-- cake/tests/cases/libs/{ => error}/error_handler.test.php | 0 cake/tests/cases/libs/{ => error}/exception_renderer.test.php | 0 7 files changed, 5 insertions(+), 5 deletions(-) rename cake/libs/{ => error}/error_handler.php (99%) rename cake/libs/{ => error}/exception_renderer.php (100%) rename cake/libs/{ => error}/exceptions.php (100%) rename cake/tests/cases/libs/{ => error}/error_handler.test.php (100%) rename cake/tests/cases/libs/{ => error}/exception_renderer.test.php (100%) diff --git a/cake/bootstrap.php b/cake/bootstrap.php index e35c9b41d..acfc7bb2f 100644 --- a/cake/bootstrap.php +++ b/cake/bootstrap.php @@ -26,14 +26,14 @@ error_reporting(E_ALL & ~E_DEPRECATED); require CORE_PATH . 'cake' . DS . 'basics.php'; require CORE_PATH . 'cake' . DS . 'config' . DS . 'paths.php'; -require LIBS . 'exceptions.php'; +require LIBS . 'error' . DS . 'exceptions.php'; require LIBS . 'object.php'; require LIBS . 'inflector.php'; require LIBS . 'app.php'; require LIBS . 'configure.php'; require LIBS . 'set.php'; require LIBS . 'cache.php'; -require LIBS . 'error_handler.php'; +require LIBS . 'error' . DS . 'error_handler.php'; Configure::bootstrap(isset($boot) ? $boot : true); diff --git a/cake/libs/error_handler.php b/cake/libs/error/error_handler.php similarity index 99% rename from cake/libs/error_handler.php rename to cake/libs/error/error_handler.php index 15d86b247..daa6b3234 100644 --- a/cake/libs/error_handler.php +++ b/cake/libs/error/error_handler.php @@ -104,7 +104,7 @@ class ErrorHandler { * @see http://php.net/manual/en/function.set-exception-handler.php */ public static function handleException(Exception $exception) { - App::import('Core', 'ExceptionRenderer'); + App::import('Core', 'error/ExceptionRenderer'); $config = Configure::read('Exception'); if (!empty($config['log'])) { if (!class_exists('CakeLog')) { diff --git a/cake/libs/exception_renderer.php b/cake/libs/error/exception_renderer.php similarity index 100% rename from cake/libs/exception_renderer.php rename to cake/libs/error/exception_renderer.php diff --git a/cake/libs/exceptions.php b/cake/libs/error/exceptions.php similarity index 100% rename from cake/libs/exceptions.php rename to cake/libs/error/exceptions.php diff --git a/cake/tests/cases/libs/all_error.test.php b/cake/tests/cases/libs/all_error.test.php index cfd994393..e37176908 100644 --- a/cake/tests/cases/libs/all_error.test.php +++ b/cake/tests/cases/libs/all_error.test.php @@ -38,8 +38,8 @@ class AllErrorTest extends PHPUnit_Framework_TestSuite { $libs = CORE_TEST_CASES . DS . 'libs' . DS; - $suite->addTestFile($libs . 'error_handler.test.php'); - $suite->addTestFile($libs . 'exception_renderer.test.php'); + $suite->addTestFile($libs . 'error' . DS . 'error_handler.test.php'); + $suite->addTestFile($libs . 'error' . DS . 'exception_renderer.test.php'); return $suite; } } diff --git a/cake/tests/cases/libs/error_handler.test.php b/cake/tests/cases/libs/error/error_handler.test.php similarity index 100% rename from cake/tests/cases/libs/error_handler.test.php rename to cake/tests/cases/libs/error/error_handler.test.php diff --git a/cake/tests/cases/libs/exception_renderer.test.php b/cake/tests/cases/libs/error/exception_renderer.test.php similarity index 100% rename from cake/tests/cases/libs/exception_renderer.test.php rename to cake/tests/cases/libs/error/exception_renderer.test.php