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:
mniip 2014-01-25 15:38:00 +04:00
parent f66679e551
commit 09beafed3a
2 changed files with 2 additions and 11 deletions

View File

@ -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();

View File

@ -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();