Fix ParseExceptions falling through;
Apparently since when the RequestBroker was added, the logic has been changed, and the exception no longer comes through PreviewController's try{} block.
This commit is contained in:
parent
f66679e551
commit
09beafed3a
@ -62,16 +62,6 @@ void PreviewController::Update()
|
||||
delete loginWindow;
|
||||
loginWindow = NULL;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
previewModel->Update();
|
||||
}
|
||||
catch (PreviewModelException & e)
|
||||
{
|
||||
Exit();
|
||||
new ErrorMessage("Error", e.what());
|
||||
}
|
||||
if(previewModel->GetDoOpen() && previewModel->GetSave() && previewModel->GetSave()->GetGameSave())
|
||||
{
|
||||
Exit();
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "PreviewModel.h"
|
||||
#include "client/Client.h"
|
||||
#include "client/GameSave.h"
|
||||
#include "gui/dialogues/ErrorMessage.h"
|
||||
#include "PreviewModelException.h"
|
||||
|
||||
PreviewModel::PreviewModel():
|
||||
@ -174,7 +175,7 @@ void PreviewModel::OnResponseReady(void * object, int identifier)
|
||||
}
|
||||
catch(ParseException &e)
|
||||
{
|
||||
throw PreviewModelException("Save file corrupt or from newer version");
|
||||
new ErrorMessage("Error", e.what());
|
||||
}
|
||||
notifySaveChanged();
|
||||
notifyCommentsPageChanged();
|
||||
|
Loading…
Reference in New Issue
Block a user