Browse Source

App::abort(404) if route not found

namespace
Alexander Demidov 10 years ago
parent
commit
b710a63dc7
  1. 3
      App/FrontController.php

3
App/FrontController.php

@ -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();

Loading…
Cancel
Save