Log the location of the primary resources file

Also emit the full path to the file in the exception
This commit is contained in:
Dale Glass 2021-08-12 23:49:44 +02:00
parent 6eb7b9ecff
commit 8a8093e529

View file

@ -805,11 +805,13 @@ bool setupEssentials(int& argc, char** argv, bool runningMarkerExisted) {
{
const QString resourcesBinaryFile = PathUtils::getRccPath();
qCInfo(interfaceapp) << "Loading primary resources from" << resourcesBinaryFile;
if (!QFile::exists(resourcesBinaryFile)) {
throw std::runtime_error("Unable to find primary resources");
throw std::runtime_error(QString("Unable to find primary resources from '%1'").arg(resourcesBinaryFile).toStdString());
}
if (!QResource::registerResource(resourcesBinaryFile)) {
throw std::runtime_error("Unable to load primary resources");
throw std::runtime_error(QString("Unable to load primary resources from '%1'").arg(resourcesBinaryFile).toStdString());
}
}