Fix failing to change the favourite status of a save crashing the game
I have no idea where the code that used to handle PreviewModelException went but it's pointless anyway; out the window it goes.
This commit is contained in:
parent
9ea09d129d
commit
3388094110
@ -1,7 +1,6 @@
|
||||
#include "PreviewController.h"
|
||||
#include "Controller.h"
|
||||
#include "PreviewModel.h"
|
||||
#include "PreviewModelException.h"
|
||||
#include "PreviewView.h"
|
||||
#include "client/Client.h"
|
||||
#include "client/SaveInfo.h"
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include "client/GameSave.h"
|
||||
#include "client/SaveInfo.h"
|
||||
#include "gui/dialogues/ErrorMessage.h"
|
||||
#include "PreviewModelException.h"
|
||||
#include "PreviewView.h"
|
||||
#include "Config.h"
|
||||
#include <cmath>
|
||||
@ -244,11 +243,11 @@ void PreviewModel::Update()
|
||||
{
|
||||
if (favouriteSaveRequest->Favourite())
|
||||
{
|
||||
throw PreviewModelException("Error, could not fav. the save: " + ByteString(ex.what()).FromUtf8());
|
||||
new ErrorMessage("Error", "Could not favourite the save: " + ByteString(ex.what()).FromUtf8());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw PreviewModelException("Error, could not unfav. the save: " + ByteString(ex.what()).FromUtf8());
|
||||
new ErrorMessage("Error", "Could not unfavourite the save: " + ByteString(ex.what()).FromUtf8());
|
||||
}
|
||||
}
|
||||
favouriteSaveRequest.reset();
|
||||
|
@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
#include "common/String.h"
|
||||
#include <exception>
|
||||
|
||||
struct PreviewModelException: public std::exception
|
||||
{
|
||||
ByteString message;
|
||||
public:
|
||||
PreviewModelException(String message_): message(message_.ToUtf8()) {}
|
||||
const char * what() const throw() override
|
||||
{
|
||||
return message.c_str();
|
||||
}
|
||||
~PreviewModelException() throw() {}
|
||||
};
|
Loading…
Reference in New Issue
Block a user