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

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

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


From: David White
Subject: [Wesnoth-cvs-commits] wesnoth/src game.cpp
Date: Sat, 28 Aug 2004 00:22:43 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/08/28 04:18:00

Modified files:
        src            : game.cpp 

Log message:
        made it so an error message will be displayed in a dialog when a 
campaign has corrupt WML

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

Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.117 wesnoth/src/game.cpp:1.118
--- wesnoth/src/game.cpp:1.117  Mon Aug 23 06:40:59 2004
+++ wesnoth/src/game.cpp        Sat Aug 28 04:17:59 2004
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.117 2004/08/23 06:40:59 gakusho Exp $ */
+/* $Id: game.cpp,v 1.118 2004/08/28 04:17:59 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1076,7 +1076,13 @@
                //make a new game config item based on the difficulty level
                std::vector<line_source> line_src;
                config game_config;
-               read_game_cfg(defines_map,line_src,game_config,use_caching);
+               
+               try {
+                       
read_game_cfg(defines_map,line_src,game_config,use_caching);
+               } catch(config::error& e) {
+                       gui::show_dialog(disp,NULL,"","Error loading game 
configuration files: '" + e.message + "' (The game will now exit)", 
gui::MESSAGE);
+                       throw e;
+               }
 
                const binary_paths_manager bin_paths_manager(game_config);
 




reply via email to

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