diff --git a/src/Application/UI/Component.php b/src/Application/UI/Component.php index 82adb6199..3b0171549 100644 --- a/src/Application/UI/Component.php +++ b/src/Application/UI/Component.php @@ -382,7 +382,7 @@ public function redirectPermanent(string $destination, ...$args): never * Throws HTTP error. * @throws Nette\Application\BadRequestException */ - public function error(string $message = '', int $httpCode = Nette\Http\IResponse::S404_NotFound): void + public function error(string $message = '', int $httpCode = Nette\Http\IResponse::S404_NotFound): never { throw new Nette\Application\BadRequestException($message, $httpCode); }