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

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

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


From: Yann Dirson
Subject: [Wesnoth-cvs-commits] wesnoth/src help.cpp
Date: Mon, 14 Mar 2005 18:50:53 -0500

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Yann Dirson <address@hidden>    05/03/14 23:50:52

Modified files:
        src            : help.cpp 

Log message:
        added debugging code to help spotting broken links in the help system

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

Patches:
Index: wesnoth/src/help.cpp
diff -u wesnoth/src/help.cpp:1.75 wesnoth/src/help.cpp:1.76
--- wesnoth/src/help.cpp:1.75   Mon Mar 14 20:48:35 2005
+++ wesnoth/src/help.cpp        Mon Mar 14 23:50:52 2005
@@ -974,7 +974,7 @@
        // Look through all the unit types, check if a unit of this type
        // should have a full description, if so, add this units abilities
        // for display. We do not want to show abilities that the user has
-       // not enountered yet.
+       // not encountered yet.
        for(game_data::unit_type_map::const_iterator i = 
game_info->unit_types.begin();
            i != game_info->unit_types.end(); i++) {
                const unit_type &type = (*i).second;
@@ -1730,6 +1730,12 @@
        bool show_ref = true;
        if (find_topic(toplevel_, dst) == NULL && !force) {
                show_ref = false;
+               if (game_config::debug) {
+                       std::string msg = "Reference to non-existent topic '" + 
dst +
+                               "'. Please submit a bug report if you have not 
modified the game files yourself. Errornous config: ";
+                       msg += write(cfg);
+                       throw parse_error(msg);
+               }
        }
        if (dst == "") {
                std::string msg = 




reply via email to

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