Browse Source

Throw error exception properly

adaptive-webui-19844
Chocobo1 2 years ago
parent
commit
e06e1d9911
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 6
      src/webui/webapplication.cpp

6
src/webui/webapplication.cpp

@ -155,11 +155,7 @@ void WebApplication::sendWebUIFile() @@ -155,11 +155,7 @@ void WebApplication::sendWebUIFile()
if (m_isAltUIUsed)
{
if (!Utils::Fs::isRegularFile(localPath))
{
status(500, u"Internal Server Error"_qs);
print(tr("Unacceptable file type, only regular file is allowed."), Http::CONTENT_TYPE_TXT);
return;
}
throw InternalServerErrorHTTPError(tr("Unacceptable file type, only regular file is allowed."));
QFileInfo fileInfo {localPath.data()};
while (Path(fileInfo.filePath()) != m_rootFolder)

Loading…
Cancel
Save