Throw correct exception-types.

This commit is contained in:
Simon Sessingo
2018-02-27 08:58:57 +01:00
parent 79c82c90cc
commit be39010be3
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -221,6 +221,7 @@ class Router
* @param bool $rewrite
* @return string|mixed
* @throws HttpException
* @throws \Exception
*/
public function routeRequest($rewrite = false)
{
@@ -334,6 +335,7 @@ class Router
/**
* @param \Exception $e
* @throws HttpException
* @throws \Exception
* @return string
*/
protected function handleException(\Exception $e)
@@ -365,7 +367,7 @@ class Router
}
}
throw new HttpException($e->getMessage(), (int)$e->getCode(), $e->getPrevious());
throw $e;
}
public function arrayToParams(array $getParams = [], $includeEmpty = true)