# HttpSoft\Router exceptions
The HttpSoft\Router package exception classes.
# HttpSoft\Router\Exception\RouteAlreadyExistsException
Thrown if the route already exists.
throw HttpSoft\Router\Exception\RouteAlreadyExistsException::create($routeName);
# HttpSoft\Router\Exception\RouteNotFoundException
Thrown if the route doesn't exist.
throw HttpSoft\Router\Exception\RouteNotFoundException::create($routeName);
# HttpSoft\Router\Exception\InvalidRouteParameterException
Thrown if the request method is not a string type.
throw HttpSoft\Router\Exception\InvalidRouteParameterException::forMethods($method);
Thrown if the parameter token value is an empty string or not null
.
throw HttpSoft\Router\Exception\InvalidRouteParameterException::forMethods($method);
Thrown if the default parameter value is not a scalar type.
throw HttpSoft\Router\Exception\InvalidRouteParameterException::forDefaults($default);
Thrown if the parameter value is not a scalar type or null
.
throw HttpSoft\Router\Exception\InvalidRouteParameterException::forNotNullOrScalar($parameter);
Thrown if the value of the required parameter was not passed or is null
.
throw HttpSoft\Router\Exception\InvalidRouteParameterException::forNotPassed($name);
Thrown if the parameter value does not match the regular expression.
throw HttpSoft\Router\Exception\InvalidRouteParameterException::forNotMatched($name, $value, $pattern);
Thrown if the passed host does not match the regular expression.
throw HttpSoft\Router\Exception\InvalidRouteParameterException::forNotHostMatched($host, $pattern);