From 797fc7a3c06a1ab19b1ddc231056768ab855ca31 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 16 May 2014 08:20:44 +0000 Subject: [PATCH] Fix Exception names in \Mibew\Application class --- src/mibew/libs/classes/Mibew/Application.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mibew/libs/classes/Mibew/Application.php b/src/mibew/libs/classes/Mibew/Application.php index f01b979b..62072d59 100644 --- a/src/mibew/libs/classes/Mibew/Application.php +++ b/src/mibew/libs/classes/Mibew/Application.php @@ -21,7 +21,6 @@ use Mibew\AccessControl\Check\CheckResolver; use Mibew\Controller\ControllerResolver; use Mibew\EventDispatcher; use Mibew\Http\Exception\AccessDeniedException as AccessDeniedHttpException; -use Mibew\Http\Exception\BadRequestException as BadRequestHttpException; use Mibew\Http\Exception\HttpException; use Mibew\Http\Exception\MethodNotAllowedException as MethodNotAllowedHttpException; use Mibew\Http\Exception\NotFoundException as NotFoundHttpException; @@ -91,7 +90,7 @@ class Application // Check if the user can access the page $access_check = $this->accessCheckResolver->getCheck($request); if (!call_user_func($access_check, $request)) { - throw new RoutingAccessDeniedException(); + throw new AccessDeniedRoutingException(); } } catch (AccessDeniedRoutingException $e) { // Convert the exception to HTTP exception to process it later. @@ -107,7 +106,7 @@ class Application // Get controller and perform its action to get a response. $controller = $this->controllerResolver->getController($request); $response = call_user_func($controller, $request); - } catch (HttpAccessDeniedException $e) { + } catch (AccessDeniedHttpException $e) { return $this->buildAccessDeniedResponse($request); } catch (HttpException $e) { // Build response based on status code which is stored in exception