Start project PHP Back.
50% routes.
This commit is contained in:
15
src/Exceptions/InvalidRouteException.php
Normal file
15
src/Exceptions/InvalidRouteException.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
class InvalidRouteException extends \Exception {
|
||||
|
||||
private string $clientRoute;
|
||||
|
||||
public function __construct(string $clientRoute)
|
||||
{
|
||||
$this->clientRoute = $clientRoute;
|
||||
$message = "{$clientRoute} doesn't exist";
|
||||
parent::__construct($message, 404);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user