2012-06-01 04:42:55 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class TestAppsExceptionRenderer extends ExceptionRenderer {
|
|
|
|
|
|
|
|
protected function _getController($exception) {
|
|
|
|
App::uses('TestAppsErrorController', 'Controller');
|
|
|
|
if (!$request = Router::getRequest(true)) {
|
|
|
|
$request = new CakeRequest();
|
|
|
|
}
|
2012-09-27 18:28:19 +00:00
|
|
|
$response = new CakeResponse();
|
2012-06-01 04:42:55 +00:00
|
|
|
try {
|
|
|
|
$controller = new TestAppsErrorController($request, $response);
|
|
|
|
$controller->layout = 'banana';
|
|
|
|
} catch (Exception $e) {
|
|
|
|
$controller = new Controller($request, $response);
|
|
|
|
$controller->viewPath = 'Errors';
|
|
|
|
}
|
|
|
|
return $controller;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|