Don't catch config::error in config_cache::read_configs()
Reverts a bit of commit d6dfec6151
to fix
a regression affecting both master and 1.12 since after version 1.11.14
which was causing WML validity errors to not abort the WML load process
or result in a message to the user in the GUI.
The WML parser and preprocessor throw config::error and
preproc_config::error to signal callers of issues with user input (WML
documents, in this case).
We need any exceptions thrown by the WML parser or preprocessor to
propagate upstream so they can be caught by the code responsible for
initiating the sequence so it can best decide how to present them to the
user. For example, the game_config_manager class will format and pass
them to gui2::twml_error so that the user can be informed of errors in
an add-on or mainline through the GUI.
Because config_cache::read_configs() was catching the exception and not
propagating it upstream due to a change that's part of the
aforementioned commit, this sequence was broken, and while the error was
reported to stderr, the game continued as normal in most cases with
a malformed half-parsed WML tree, resulting in all kinds of misbehavior.
This issue was originally reported in the forums by SkyOne:
<http://r.wesnoth.org/p571380>
This commit is contained in:
parent
24d6015767
commit
0751431d7d
4 changed files with 20 additions and 9 deletions
|
@ -14,6 +14,10 @@ The release team should empty this file after each release.
|
|||
CHANGES
|
||||
=======
|
||||
|
||||
[section="Fixed WML load error reporting"]
|
||||
A change introduced in version 1.11.15 caused WML parser/preprocessor errors found at game/add-on load time to not be reported to the player in the GUI, and the game to carry on with a incomplete and malformed WML tree in most cases. This issue was [url=http://r.wesnoth.org/p571380]reported[/url] on the forums by SkyOne and is fixed in this release.
|
||||
[/section]
|
||||
|
||||
[section="Changes to the Mushroom Groove overlay terrain"]
|
||||
A change to the way how the Mushroom Groove terrain works might cause the need for some map rebalancing.
|
||||
Previously the mixed fungus terrain worked always like plain Mushroom Groove, now it is handled like the forest overlays.
|
||||
|
|
|
@ -17,6 +17,11 @@ Version 1.11.15+dev:
|
|||
* Disabled the tod schedule and playlist menues in pure map mode.
|
||||
* Support for displaying the saved status of the selected area.
|
||||
* Fixed error messages about missing UI elements.
|
||||
* WML engine:
|
||||
* Fixed a regression in 1.11.14 causing WML parser/preprocessor errors to
|
||||
not interrupt the game load sequence or display an error message in-game,
|
||||
resulting in loading malformed/incomplete WML data
|
||||
<http://r.wesnoth.org/p571380>.
|
||||
* Miscellaneous and bug fixes:
|
||||
* Backported Elvish_Hunter's wmltools GUI from master
|
||||
* Changed the fungus overlay terrain to repect the game values of the mixed partner.
|
||||
|
|
|
@ -6,7 +6,13 @@ Version 1.11.15+dev:
|
|||
* Language and i18n:
|
||||
* Updated translations:
|
||||
|
||||
|
||||
* WML engine:
|
||||
* Fixed a regression in 1.11.14 causing WML parser/preprocessor errors to
|
||||
not interrupt the game load sequence or display an error message in-game,
|
||||
resulting in loading malformed/incomplete WML data
|
||||
<http://r.wesnoth.org/p571380>.
|
||||
|
||||
|
||||
Version 1.11.15:
|
||||
* Language and i18n:
|
||||
* Updated translations: Portuguese
|
||||
|
@ -23,7 +29,7 @@ Version 1.11.14:
|
|||
* Revert premoved units selection to Wesnoth 1.10 behavior (#21448)
|
||||
* Fix unit move continuation if enemy discovered (#21372)
|
||||
|
||||
|
||||
|
||||
Version 1.11.13:
|
||||
* AI:
|
||||
* Micro AIs: fixes for a variety of rarely occurring but serious bugs
|
||||
|
|
|
@ -146,13 +146,9 @@ namespace game_config {
|
|||
|
||||
void config_cache::read_configs(const std::string& path, config& cfg, preproc_map& defines_map)
|
||||
{
|
||||
try {
|
||||
//read the file and then write to the cache
|
||||
scoped_istream stream = preprocess_file(path, &defines_map);
|
||||
read(cfg, *stream);
|
||||
} catch (config::error & e) {
|
||||
ERR_CACHE << "error parsing configs in '" << path << "', got config::error\n" << e.message << std::endl;
|
||||
}
|
||||
//read the file and then write to the cache
|
||||
scoped_istream stream = preprocess_file(path, &defines_map);
|
||||
read(cfg, *stream);
|
||||
}
|
||||
|
||||
void config_cache::read_cache(const std::string& path, config& cfg)
|
||||
|
|
Loading…
Add table
Reference in a new issue