chore: complete update
This commit is contained in:
27
src/Framework/Router/Exception/RouteNotFound.php
Normal file
27
src/Framework/Router/Exception/RouteNotFound.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
namespace App\Framework\Router\Exception;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
use App\Framework\Http\Exception\HttpException;
|
||||
use App\Framework\Http\Status;
|
||||
|
||||
class RouteNotFound extends FrameworkException implements HttpException
|
||||
{
|
||||
public Status $status {
|
||||
get {
|
||||
return Status::NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
||||
protected string $route;
|
||||
|
||||
public function __construct(string $route, ?\Throwable $previous = null, int $code = 0, array $context = [])
|
||||
{
|
||||
$this->route = $route;
|
||||
$message = "Route not found: {$route}";
|
||||
|
||||
#$context
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user