wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src gamestatus.cpp


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src gamestatus.cpp
Date: Fri, 03 Jun 2005 22:24:26 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    05/06/04 02:24:26

Modified files:
        src            : gamestatus.cpp 

Log message:
        made the game display an error message when a save could not be 
completed

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/gamestatus.cpp.diff?tr1=1.71&tr2=1.72&r1=text&r2=text

Patches:
Index: wesnoth/src/gamestatus.cpp
diff -u wesnoth/src/gamestatus.cpp:1.71 wesnoth/src/gamestatus.cpp:1.72
--- wesnoth/src/gamestatus.cpp:1.71     Wed Apr 27 21:11:44 2005
+++ wesnoth/src/gamestatus.cpp  Sat Jun  4 02:24:26 2005
@@ -1,4 +1,4 @@
-/* $Id: gamestatus.cpp,v 1.71 2005/04/27 21:11:44 gruikya Exp $ */
+/* $Id: gamestatus.cpp,v 1.72 2005/06/04 02:24:26 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -16,7 +16,8 @@
 #include "filesystem.hpp"
 #include "game_config.hpp"
 #include "game_errors.hpp"
-#include "gamestatus.hpp"
+#include "gamestatus.hpp"
+#include "gettext.hpp"
 #include "language.hpp"
 #include "log.hpp"
 #include "preferences.hpp"
@@ -470,7 +471,10 @@
                const std::string fname = get_saves_dir() + "/" + name;
                {
                        scoped_ostream savefile = ostream_file(fname);
-                       write_possibly_compressed(*savefile, cfg, 
preferences::compress_saves());
+                       write_possibly_compressed(*savefile, cfg, 
preferences::compress_saves());
+                       if(savefile->good() == false) {
+                               throw game::save_game_failed(_("Could not write 
to file"));
+                       }
                }
 
                config& summary = save_summary(state.label);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]