mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-30 19:29:52 +02:00
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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user