[Commits] [wesnoth/wesnoth] 075143: Don't catch config::error in config_cache::read_co...

GitHub noreply at github.com
Sun Jun 8 21:10:12 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 0751431d7d310c6e8df71c88c99d6d4d09d159e9
      https://github.com/wesnoth/wesnoth/commit/0751431d7d310c6e8df71c88c99d6d4d09d159e9
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-08 (Sun, 08 Jun 2014)

  Changed paths:
    M RELEASE_NOTES
    M changelog
    M players_changelog
    M src/config_cache.cpp

  Log Message:
  -----------
  Don't catch config::error in config_cache::read_configs()

Reverts a bit of commit d6dfec6151fb6eb5dd2d9f2d96920f1a9d7ec1ca 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>


  Commit: 56defec6bb76eb15b98f07adab302e800fbf3323
      https://github.com/wesnoth/wesnoth/commit/56defec6bb76eb15b98f07adab302e800fbf3323
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2014-06-08 (Sun, 08 Jun 2014)

  Changed paths:
    M changelog

  Log Message:
  -----------
  Rearrange Editor changelog entries and change header

For consistency with past entries.


Compare: https://github.com/wesnoth/wesnoth/compare/24d6015767b1...56defec6bb76


More information about the Commits mailing list