Say what the error is when a broken .po file stops Wesnoth starting

Bug #5923 is that a broken .po file can make Wesnoth fail to start, not
even reaching the title screen. Additionally, the error message printed
to the console just said "*timestamp* error general:", and then missed
the details of what had broken.

This commit fixes the error message to show which add-on and which line
are causing the problem.

(cherry picked from commit eaa39d653b)
This commit is contained in:
Steve Cotton 2021-07-04 14:11:29 +02:00 committed by Steve Cotton
parent 339b1d5de0
commit b4b0c73acb

View file

@ -146,7 +146,7 @@ namespace
std::ostringstream err;
err << "Error opening language file for " << lang << ", textdomain " << dom
<< ":\n " << detail << '\n';
ERR_G << err.rdbuf() << std::flush;
ERR_G << err.str() << std::flush;
throw game::error(err.str());
}