Nuke oopsError and out-dated "can't load game" error dialogs

This commit is contained in:
2015-07-03 18:11:03 -04:00
parent 558b1b8f62
commit 2d73bb01ae
7 changed files with 64 additions and 76 deletions

View File

@@ -542,18 +542,3 @@ void giveError(std::string str1, std::string str2, cDialog* parent){
void giveError(std::string str1, cDialog* parent) {
giveError(str1, "", parent);
}
void oopsError(short error, short code, short mode){
std::ostringstream error_str1, error_str2;
static const char* progname[3] = {"the scenario editor", "Blades of Exile", "the PC editor"};
static const char* filetname[3] = {"scenario", "game", "game"};
error_str1 << "The program encountered an error while loading/saving/creating the " << filetname[mode]
<< ". To prevent future problems, the program will now terminate. Trying again may solve the problem.";
// TODO: Update this error message - giving more memory is no longer an option in OSX.
error_str2 << "Giving " << progname[mode] << " more memory might also help. Be sure to back your " << filetname[mode] << " up often. Error number: " << error << ".";
if(code != 0)
error_str2 << " Result code: " << code << ".";
giveError(error_str1.str(),error_str2.str(),NULL);
exit(1);
}

View File

@@ -264,8 +264,3 @@ void giveError(std::string str1, std::string str2, cDialog* parent = NULL);
/// @param str1 The string in the error dialog.
/// @param parent Optionally, a parent dialog.
void giveError(std::string str1, cDialog* parent = NULL);
/// Shows a generic error dialog and exits.
/// @param error An arbitrary code intended to be used for locating the error in the source.
/// @param code A code indicating the result of a failed action that triggered the error.
/// @param mode 0 for scenario editor, 1 for game, 2 for pc editor
void oopsError(short error,short code = 0, short mode = 0);