Skip to content

Commit bdba887

Browse files
committed
Replace exception method in favor of generic
1 parent e2b703b commit bdba887

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

system/Router/Exceptions/RedirectException.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@
88

99
class RedirectException extends \Exception
1010
{
11-
public static function forRedirectIntercept(string $route)
12-
{
13-
return new static($route);
14-
}
11+
1512
}

system/Router/Router.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ protected function checkRoutes(string $uri): bool
484484
// Is this route supposed to redirect to another?
485485
if ($this->collection->isRedirect($key))
486486
{
487-
throw RedirectException::forRedirectIntercept($val, $this->collection->getRedirectCode($key));
487+
throw new RedirectException($val, $this->collection->getRedirectCode($key));
488488
}
489489

490490
$this->setRequest(explode('/', $val));

0 commit comments

Comments
 (0)