Code refactoring, #16
git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@116 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
@ -108,7 +108,7 @@ class FrontController
|
|||||||
{
|
{
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//try {
|
try {
|
||||||
$request = Env::getRequestUri();
|
$request = Env::getRequestUri();
|
||||||
$route = $this->getRouter()->route($request);
|
$route = $this->getRouter()->route($request);
|
||||||
if (!$route) {
|
if (!$route) {
|
||||||
@ -120,21 +120,15 @@ class FrontController
|
|||||||
$layout_class = $route->getLayout();
|
$layout_class = $route->getLayout();
|
||||||
$layout = new $layout_class();
|
$layout = new $layout_class();
|
||||||
return $layout->fetch($action);
|
return $layout->fetch($action);
|
||||||
//} catch (GeneralException $e) {
|
} catch (GeneralException $e) {
|
||||||
// throw $e;
|
throw $e;
|
||||||
//} /*catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new GeneralException($e->getMessage(), $e->getCode());
|
throw new GeneralException($e->getMessage(), $e->getCode());
|
||||||
//} */
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
var_dump($e);
|
if (DEBUG == true) {
|
||||||
die('111');
|
|
||||||
|
|
||||||
/*if (DEBUG == true) {
|
|
||||||
return $e->toHtml();
|
return $e->toHtml();
|
||||||
} else {
|
}
|
||||||
$layout = new ErrorLayout();
|
|
||||||
return $layout->fetch($e->getCode());
|
|
||||||
} */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user