template->appVersion = Konstanty::verze; } public function renderDefault(Nette\Application\BadRequestException $exception): void { // renders the appropriate error template based on the HTTP status code $code = $exception->getCode(); $file = is_file($file = __DIR__ . "/$code.latte") ? $file : __DIR__ . '/4xx.latte'; $this->template->httpCode = $code; $this->template->setFile($file); } }