Improved error message when bootsrap file URL is not reachable

based on slack discussion during move of "shared" directory
This commit is contained in:
Klaus Basan
2016-10-19 19:28:15 +02:00
parent ea17b2bb14
commit ff1ea3826b

View File

@@ -244,8 +244,8 @@ namespace BlackCore
CSetupReader::BootstrapMode CSetupReader::stringToEnum(const QString &s)
{
const QString bsm(s.toLower().trimmed());
if (bsm.startsWith("expl")) return Explicit;
if (bsm.startsWith("cache")) return CacheOnly;
if (bsm.startsWith("expl")) { return Explicit; }
if (bsm.startsWith("cache")) { return CacheOnly; }
return Implicit;
}
@@ -475,9 +475,13 @@ namespace BlackCore
}
else if (!available)
{
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityError, "Setup not available"));
}
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityError, "Setup not available"));
if (this->m_bootstrapMode == Explicit)
{
msgs.push_back(CStatusMessage(this, CStatusMessage::SeverityError, "Mode is 'explicit', likely URL '" + this->m_bootstrapUrlFileValue + "' is not reachable"));
}
}
this->m_setupAvailable = available;
emit setupAvailable(available);