Catch exceptions when loading initial stamp
This commit is contained in:
parent
186e62dec4
commit
b1df1e164c
@ -818,8 +818,16 @@ SaveFile * Client::GetStamp(std::string stampID)
|
|||||||
stampFile.close();
|
stampFile.close();
|
||||||
|
|
||||||
SaveFile * file = new SaveFile(std::string(stampID).c_str());
|
SaveFile * file = new SaveFile(std::string(stampID).c_str());
|
||||||
GameSave * tempSave = new GameSave((char *)tempData, fileSize);
|
GameSave * tempSave = NULL;
|
||||||
file->SetGameSave(tempSave);
|
try
|
||||||
|
{
|
||||||
|
GameSave * tempSave = new GameSave((char *)tempData, fileSize);
|
||||||
|
file->SetGameSave(tempSave);
|
||||||
|
}
|
||||||
|
catch (ParseException & e)
|
||||||
|
{
|
||||||
|
std::cerr << "Client: Invalid stamp file, " << stampID << " " << std::string(e.what()) << std::endl;
|
||||||
|
}
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user