App::abort(404) if route not found

This commit is contained in:
2014-07-23 18:47:50 +04:00
parent 1922886c2f
commit b710a63dc7

View File

@ -105,7 +105,8 @@ class FrontController
$request = \Majestic\Env::getRequestUri(true);
$route = $this->getRouter()->route($request);
if (!$route) {
throw new \Majestic\Exception\Error404Exception('Route for "' . $request . '" not found');
$message = 'Route for "' . $request . '" not found';
\App::abort(404, $message);
}
$action_class = $route->getAction();