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: Sun, 12 Sep 2004 19:19:04 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     David White <address@hidden>    04/09/12 23:13:35

Modified files:
        src            : game.cpp 

Log message:
        fixed bug in getting campaigns that could cause a crash if files 
weren't available

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

Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.127 wesnoth/src/game.cpp:1.128
--- wesnoth/src/game.cpp:1.127  Sun Sep 12 21:55:19 2004
+++ wesnoth/src/game.cpp        Sun Sep 12 23:13:35 2004
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.127 2004/09/12 21:55:19 Sirp Exp $ */
+/* $Id: game.cpp,v 1.128 2004/09/12 23:13:35 Sirp Exp $ */
 /*
    Copyright (C) 2003 by David White <address@hidden>
    Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -379,6 +379,8 @@
 
                        config cfg;
                        archive_campaign(campaign,cfg);
+
+                       std::cerr << "connecting to server...\n";
                        
                        const network::manager net_manager;
                        network::connection sock = 
network::connect(host,lexical_cast_default<int>(port,15002));
@@ -387,6 +389,8 @@
                                return 0;
                        }
 
+                       std::cerr << "connected to server. Building 
campaign...\n";
+
                        config data;
                        config& upload = data.add_child("upload");
                        upload["name"] = campaign;
@@ -1073,6 +1077,9 @@
                                } catch(network::error& e) {
                                        
gui::show_dialog(disp,NULL,_("Error"),_("Remote host 
disconnected."),gui::OK_ONLY);
                                        continue;
+                               } catch(io_exception& e) {
+                                       
gui::show_dialog(disp,NULL,_("Error"),_("There was a problem creating the files 
necessary to install this campaign."),gui::OK_ONLY);
+                                       continue;
                                }
                        }
 




reply via email to

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