Author: soliton
Date: Sat May 16 01:58:20 2009
New Revision: 35648
URL: http://svn.gna.org/viewcvs/wesnoth?rev=35648&view=rev
Log:
check if we're missing to catch an exception
Modified:
branches/1.6/src/server/game.cpp
Modified: branches/1.6/src/server/game.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/server/game.cpp?rev=35648&r1=35647&r2=35648&view=diff
==============================================================================
--- branches/1.6/src/server/game.cpp (original)
+++ branches/1.6/src/server/game.cpp Sat May 16 01:58:20 2009
@@ -95,13 +95,19 @@
{
// Hack to handle the pseudo games lobby_ and not_logged_in_.
if (owner_ == 0) return;
- save_replay();
-
- user_vector users = all_game_users();
- for (user_vector::const_iterator u = users.begin(); u != users.end();
++u) {
- remove_player(*u, false, true);
- }
- clear_history();
+
+ try {
+ save_replay();
+
+ user_vector users = all_game_users();
+ for (user_vector::const_iterator u = users.begin(); u !=
users.end(); ++u) {
+ remove_player(*u, false, true);
+ }
+ clear_history();
+ } catch (...) {
+ LOG_GAME << "Caught unknown error while destructing game:\t\""
+ << name_ << "\" (" << id_ << ")\n";
+ }
}
bool game::allow_observers() const {
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits