diff --git a/src/main/php/web/NotFound.class.php b/src/main/php/web/NotFound.class.php new file mode 100755 index 00000000..f95da364 --- /dev/null +++ b/src/main/php/web/NotFound.class.php @@ -0,0 +1,10 @@ +path= $path; + } +} \ No newline at end of file diff --git a/src/main/php/web/Routes.class.php b/src/main/php/web/Routes.class.php index 17e35f27..9d021f5a 100755 --- a/src/main/php/web/Routes.class.php +++ b/src/main/php/web/Routes.class.php @@ -86,12 +86,12 @@ public function default($target) { /** * Routes a request to the handler specified by this routing instance's - * routes. Throws a `CannotRoute` error if not route is matched and no + * routes. Throws a `NotFound` error if not route is matched and no * default route exists. * * @param web.Request $request * @return web.Handler - * @throws web.CannotRoute + * @throws web.NotFound */ public function target($request) { $match= $request->method().' '.rtrim($request->uri()->path(), '/').'/'; @@ -100,7 +100,7 @@ public function target($request) { } if ($this->default) return $this->default; - throw new CannotRoute($request); + throw new NotFound($request->uri()->path()); } /**