mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Logging around #1237. Typos.
This commit is contained in:
parent
608a080971
commit
1e8e932323
@ -228,10 +228,16 @@ void CClient::loadGame( const std::string & fname )
|
||||
sh.startServer();
|
||||
|
||||
CStopWatch tmh;
|
||||
try
|
||||
{
|
||||
auto clientSaveName = CResourceHandler::get()->getResourceName(ResourceID(fname, EResType::CLIENT_SAVEGAME));
|
||||
auto controlServerSaveName = CResourceHandler::get()->getResourceName(ResourceID(fname, EResType::SERVER_SAVEGAME));
|
||||
|
||||
if(clientSaveName.empty())
|
||||
throw std::runtime_error("Cannot open client part of " + fname);
|
||||
if(controlServerSaveName.empty())
|
||||
throw std::runtime_error("Cannot open server part of " + fname);
|
||||
|
||||
unique_ptr<CLoadFile> loader;
|
||||
{
|
||||
CLoadIntegrityValidator checkingLoader(clientSaveName, controlServerSaveName);
|
||||
@ -248,6 +254,11 @@ void CClient::loadGame( const std::string & fname )
|
||||
*loader >> *this;
|
||||
logNetwork->infoStream() << "Loaded client part of save " << tmh.getDiff();
|
||||
}
|
||||
catch(std::exception &e)
|
||||
{
|
||||
logGlobal->errorStream() << "Cannot load game " << fname << ". Error: " << e.what();
|
||||
throw; //obviously we cannot continue here
|
||||
}
|
||||
|
||||
serv = sh.connectToServer();
|
||||
serv->addStdVecItems(gs);
|
||||
|
@ -525,7 +525,7 @@ void CModHandler::loadGameContent()
|
||||
CStopWatch timer, totalTime;
|
||||
|
||||
CContentHandler content;
|
||||
logGlobal->infoStream() << "\tInitializing content hander: " << timer.getDiff() << " ms";
|
||||
logGlobal->infoStream() << "\tInitializing content handler: " << timer.getDiff() << " ms";
|
||||
|
||||
// first - load virtual "core" mod that contains all data
|
||||
// TODO? move all data into real mods? RoE, AB, SoD, WoG
|
||||
|
@ -111,7 +111,7 @@ void LibClasses::init()
|
||||
|
||||
createHandler(spellh, "Spell", pomtime);
|
||||
|
||||
logGlobal->infoStream()<<"\tInitializing handers: "<< totalTime.getDiff();
|
||||
logGlobal->infoStream()<<"\tInitializing handlers: "<< totalTime.getDiff();
|
||||
|
||||
modh->loadGameContent();
|
||||
modh->reload();
|
||||
|
Loading…
Reference in New Issue
Block a user