mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-16 18:50:11 +03:00
Fixed HttpException not thrown as NotFoundHttpException
This commit is contained in:
@@ -157,7 +157,7 @@ abstract class Route implements IRoute
|
||||
protected function loadClass($name)
|
||||
{
|
||||
if (!class_exists($name)) {
|
||||
throw new HttpException(sprintf('Class %s does not exist', $name), 500);
|
||||
throw new NotFoundHttpException(sprintf('Class %s does not exist', $name), 404);
|
||||
}
|
||||
|
||||
return new $name();
|
||||
|
||||
Reference in New Issue
Block a user