[Top][All Lists]
[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: |
Thu, 23 Jun 2005 19:22:17 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: David White <address@hidden> 05/06/23 23:22:17
Modified files:
src : game.cpp
Log message:
made errors in user campaigns have detailed error reports
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.254&tr2=1.255&r1=text&r2=text
Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.254 wesnoth/src/game.cpp:1.255
--- wesnoth/src/game.cpp:1.254 Sat Jun 11 12:47:09 2005
+++ wesnoth/src/game.cpp Thu Jun 23 23:22:16 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.254 2005/06/11 12:47:09 ydirson Exp $ */
+/* $Id: game.cpp,v 1.255 2005/06/23 23:22:16 Sirp Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -1277,7 +1277,7 @@
//read the file and then write to the cache
scoped_istream stream =
preprocess_file("data/game.cfg", &defines);
- std::string error_log;
+ std::string error_log, user_error_log;
read(cfg, *stream, &error_log);
//load user campaigns
@@ -1288,12 +1288,22 @@
try {
scoped_istream stream =
preprocess_file(*uc,&defines);
+ std::string campaign_error_log;
+
config user_campaign_cfg;
-
read(user_campaign_cfg,*stream,NULL);
- cfg.append(user_campaign_cfg);
- } catch(config::error&) {
- std::cerr << "error processing
user campaign '" << *uc << "'\n";
+
read(user_campaign_cfg,*stream,&campaign_error_log);
+
+ if(campaign_error_log.empty()) {
+
cfg.append(user_campaign_cfg);
+ } else {
+ user_error_log +=
error_log;
+
error_campaigns.push_back(*uc);
+ }
+ } catch(config::error& err) {
+ std::cerr << "error reading
user campaign '" << *uc << "'\n";
error_campaigns.push_back(*uc);
+
+ user_error_log += err.message +
"\n";
} catch(io_exception&) {
std::cerr << "error reading
user campaign '" << *uc << "'\n";
error_campaigns.push_back(*uc);
@@ -1307,6 +1317,8 @@
msg << "\n" << *i;
}
+ msg << "\n" << _("ERROR DETAILS:") <<
"\n" << user_error_log;
+
gui::show_error_message(disp(),msg.str());
}
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, Isaac Clerencia, 2005/06/02
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, David White, 2005/06/02
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, David White, 2005/06/04
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, Yann Dirson, 2005/06/11
- [Wesnoth-cvs-commits] wesnoth/src game.cpp,
David White <=
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, David White, 2005/06/24
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, David White, 2005/06/25
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, David White, 2005/06/27
- [Wesnoth-cvs-commits] wesnoth/src game.cpp, David White, 2005/06/28