mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 06:23:52 +00:00
[Client] Don't use try/catch when printing missing plugins
Also move load order note to bottom where it fits better.
This commit is contained in:
parent
4294508082
commit
f80a16b897
1 changed files with 8 additions and 16 deletions
|
@ -60,7 +60,6 @@ string comparePlugins(PacketPreInit::PluginContainer checksums, PacketPreInit::P
|
||||||
bool full = false)
|
bool full = false)
|
||||||
{
|
{
|
||||||
std::ostringstream sstr;
|
std::ostringstream sstr;
|
||||||
sstr << "Note: Use the same load order as the server.\n";
|
|
||||||
size_t pluginNameLen1 = 0;
|
size_t pluginNameLen1 = 0;
|
||||||
size_t pluginNameLen2 = 0;
|
size_t pluginNameLen2 = 0;
|
||||||
for (size_t i = 0; i < checksums.size(); i++)
|
for (size_t i = 0; i < checksums.size(); i++)
|
||||||
|
@ -82,25 +81,18 @@ string comparePlugins(PacketPreInit::PluginContainer checksums, PacketPreInit::P
|
||||||
{
|
{
|
||||||
string plugin;
|
string plugin;
|
||||||
unsigned val;
|
unsigned val;
|
||||||
try
|
|
||||||
|
if (i < checksums.size())
|
||||||
{
|
{
|
||||||
plugin = checksums.at(i).first;
|
plugin = checksums.at(i).first;
|
||||||
val = checksums.at(i).second[0];
|
val = checksums.at(i).second[0];
|
||||||
}
|
|
||||||
catch(exception &e)
|
|
||||||
{
|
|
||||||
plugin = "null";
|
|
||||||
val = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (plugin == "null")
|
printWithWidth(sstr, plugin, pluginNameLen1 + 2);
|
||||||
{
|
printWithWidth(sstr, intToHexStr(val), 14);
|
||||||
printWithWidth(sstr, "", pluginNameLen1 + 16);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printWithWidth(sstr, plugin, pluginNameLen1 + 2);
|
printWithWidth(sstr, "", pluginNameLen1 + 16);
|
||||||
printWithWidth(sstr, intToHexStr(val), 14);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printWithWidth(sstr, checksumsResponse[i].first, pluginNameLen2 + 2);
|
printWithWidth(sstr, checksumsResponse[i].first, pluginNameLen2 + 2);
|
||||||
|
@ -116,7 +108,7 @@ string comparePlugins(PacketPreInit::PluginContainer checksums, PacketPreInit::P
|
||||||
sstr << "any";
|
sstr << "any";
|
||||||
sstr << "\n";
|
sstr << "\n";
|
||||||
}
|
}
|
||||||
sstr << "\nMore info in logs";
|
sstr << "\nNote: Use the same load order as the server.";
|
||||||
return sstr.str();
|
return sstr.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue