blob: 8354478793f5233f34d947ab80770224fea016ce (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
<?php
/**
* Lithium: the most rad php framework
*
* @copyright Copyright 2011, Union of RAD (http://union-of-rad.org)
* @license http://opensource.org/licenses/bsd-license.php The BSD License
*/
use lithium\core\ErrorHandler;
use lithium\action\Response;
use lithium\net\http\Media;
ErrorHandler::apply('lithium\action\Dispatcher::run', array(), function($info, $params) {
$response = new Response(array(
'request' => $params['request'],
'status' => $info['exception']->getCode()
));
Media::render($response, compact('info', 'params'), array(
'controller' => '_errors',
'template' => 'development',
'layout' => 'error',
'request' => $params['request']
));
return $response;
});
?>
|