mail[Wesnoth-commits] r37273 - /branches/1.6/src/unit.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by soliton . de on July 27, 2009 - 16:51:
Author: soliton
Date: Mon Jul 27 16:51:39 2009
New Revision: 37273

URL: http://svn.gna.org/viewcvs/wesnoth?rev=37273&view=rev
Log:
print the config in question when showing the infamous "Attempt to 
de-serialize a unit with no 'type' field" error to help debugging

Modified:
    branches/1.6/src/unit.cpp

Modified: branches/1.6/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.6/src/unit.cpp?rev=37273&r1=37272&r2=37273&view=diff
==============================================================================
--- branches/1.6/src/unit.cpp (original)
+++ branches/1.6/src/unit.cpp Mon Jul 27 16:51:39 2009
@@ -1344,7 +1344,7 @@
 void unit::read(const config& cfg, bool use_traits, game_state* state)
 {
        if(cfg["type"].empty()) {
-               throw game::load_game_failed("Attempt to de-serialize a unit 
with no 'type' field (probably empty)");
+               throw game::load_game_failed("Attempt to de-serialize a unit 
with an empty 'type' field:\n" + cfg.debug());
        }
        type_ = cfg["type"];
 




Related Messages


Powered by MHonArc, Updated Mon Jul 27 17:01:31 2009