config->loadAndCheck(CONFIG_FILE); } catch (ConfigException $exception) { // Disables template caching because the cache directory is not known yet. $this->template->disableCache(); $response = $this->responseFactory->createResponse(StatusCodeInterface::STATUS_INTERNAL_SERVER_ERROR); return $response->write($this->template->render('error/generic', [ 'lang' => 'en', 'dir' => 'ltr', 'error_message' => $exception->getMessage(), ])); } return $handler->handle($request); } }