Improved (error) message if owner is empty

This commit is contained in:
Klaus Basan
2019-12-21 19:45:06 +01:00
committed by Mat Sutcliffe
parent 10a6b06a59
commit a924b5e78b
2 changed files with 6 additions and 4 deletions

View File

@@ -1039,10 +1039,11 @@ namespace BlackSimPlugin
return;
}
MultiplayerAcquireInfo info = traffic.acquireMultiplayerPlanes();
if (! info.hasAcquired)
const MultiplayerAcquireInfo info = traffic.acquireMultiplayerPlanes();
if (!info.hasAcquired)
{
CLogMessage(this).error(u"Connection to FGSwiftBus successful, but could not acquire multiplayer planes. %1 has acquired them already. Disable %2 or remove it if not required and reload FGSwiftBus.") << info.owner << info.owner;
const QString owner = info.owner.trimmed().isEmpty() ? QStringLiteral("Some/this plugin/application") : info.owner.trimmed();
CLogMessage(this).error(u"Connection to FGSwiftBus successful, but could not acquire multiplayer planes. '%1' has acquired them already. Disable '%2' or remove it if not required and reload FGSwiftBus.") << owner << owner.toLower();
return;
}

View File

@@ -1380,7 +1380,8 @@ namespace BlackSimPlugin
const MultiplayerAcquireInfo info = traffic.acquireMultiplayerPlanes();
if (!info.hasAcquired)
{
CLogMessage(this).error(u"Connection to XSwiftBus successful, but could not acquire multiplayer planes. %1 has acquired them already. Disable %2 or remove it if not required and reload XSwiftBus.") << info.owner << info.owner;
const QString owner = info.owner.trimmed().isEmpty() ? QStringLiteral("Some/this plugin/application") : info.owner.trimmed();
CLogMessage(this).error(u"Connection to XSwiftBus successful, but could not acquire multiplayer planes. '%1' has acquired them already. Disable '%2' or remove it if not required and reload XSwiftBus.") << owner << owner.toLower();
return;
}