diff --git a/App/FrontController.php b/App/FrontController.php index 8b042ec..23ad39f 100644 --- a/App/FrontController.php +++ b/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();