Adds custom exception

This commit is contained in:
2021-02-07 22:15:36 +01:00
parent e1dbdeb4dd
commit ac154b64c7
3 changed files with 13 additions and 1 deletions
+2
View File
@@ -0,0 +1,2 @@
/nbproject/
/vendor/
+10
View File
@@ -0,0 +1,10 @@
<?php
namespace Kavalanche\Router;
/**
* @author wojtek
*/
class RouteNotFoundException extends \Exception {
}
+1 -1
View File
@@ -46,7 +46,7 @@ class Router {
}
}
http_response_code(404);
throw new Exception('Route not found!');
throw new RouteNotFoundException('Route not found!');
exit;
}