mail[Wesnoth-commits] r13814 - /branches/1.2/src/help.cpp


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

Header


Content

Posted by queen . killer on October 06, 2006 - 15:52:
Author: queenkiller
Date: Fri Oct  6 15:51:48 2006
New Revision: 13814

URL: http://svn.gna.org/viewcvs/wesnoth?rev=13814&view=rev
Log:
added utf exception handling to help(without explanation string).

Modified:
    branches/1.2/src/help.cpp

Modified: branches/1.2/src/help.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.2/src/help.cpp?rev=13814&r1=13813&r2=13814&view=diff
==============================================================================
--- branches/1.2/src/help.cpp (original)
+++ branches/1.2/src/help.cpp Fri Oct  6 15:51:48 2006
@@ -2650,10 +2650,16 @@
                const unsigned width)
 {
        std::vector<std::string> res;
+       try {
        const std::string& first_line = font::word_wrap_text(s, font_size, 
width, -1, 1);
        res.push_back(first_line);
        if(s.size() > first_line.size()) {
                res.push_back(s.substr(first_line.size()));
+       }
+       }
+       catch (utils::invalid_utf8_exception e)
+       {
+               throw parse_error ("");
        }
 
        return res;




Related Messages


Powered by MHonArc, Updated Fri Oct 06 20:00:11 2006