Author: mordante
Date: Sun Feb 27 16:19:53 2011
New Revision: 48664
URL: http://svn.gna.org/viewcvs/wesnoth?rev=48664&view=rev
Log:
Catch exception by reference.
Issue found by cppcheck.
Modified:
trunk/src/help.cpp
Modified: trunk/src/help.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/help.cpp?rev=48664&r1=48663&r2=48664&view=diff
==============================================================================
--- trunk/src/help.cpp (original)
+++ trunk/src/help.cpp Sun Feb 27 16:19:53 2011
@@ -829,7 +829,7 @@
hidden_cfg.add_child("toplevel", hidden_toplevel);
hidden_sections = parse_config(&hidden_cfg);
}
- catch (parse_error e) {
+ catch (parse_error& e) {
std::stringstream msg;
msg << "Parse error when parsing help text: '" <<
e.message << "'";
std::cerr << msg.str() << std::endl;
@@ -2255,7 +2255,7 @@
#undef TRY
}
- catch (config::error e) {
+ catch (config::error& e) {
std::stringstream msg;
msg << "Error when parsing help markup as WML:
'" << e.message << "'";
throw parse_error(msg.str());
@@ -3060,7 +3060,7 @@
res.push_back(s.substr(first_line.size()));
}
}
- catch (utils::invalid_utf8_exception e)
+ catch (utils::invalid_utf8_exception&)
{
throw parse_error (_("corrupted original file"));
}
@@ -3210,7 +3210,7 @@
disp.delay(10);
}
}
- catch (parse_error e) {
+ catch (parse_error& e) {
std::stringstream msg;
msg << _("Parse error when parsing help text: ") << "'" <<
e.message << "'";
gui2::show_transient_message(disp.video(), "", msg.str());
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits