[Commits] [wesnoth/wesnoth] cbb28f: add exception handlers for "game::error" in playca...

GitHub noreply at github.com
Tue Nov 4 21:24:24 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: cbb28fd5b0ee04fed913203793d369bfa02d852d
      https://github.com/wesnoth/wesnoth/commit/cbb28fd5b0ee04fed913203793d369bfa02d852d
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-04 (Tue, 04 Nov 2014)

  Changed paths:
    M src/game_initialization/playcampaign.cpp

  Log Message:
  -----------
  add exception handlers for "game::error" in playcampaign.cpp

I also add one for mapgen_exception, but this doesn't make so much
difference. It seems to be a big problem that we don't catch
game::error anywhere, I observed a similar bug being caused by
game::error being thrown directly by a button when it couldn't
find its image. The report was that it caused the game to crash
to desktop immediately (I think it was caught only in void main.)


  Commit: 6c5b43f3bedeff9bc54ec838e50bed664561bb08
      https://github.com/wesnoth/wesnoth/commit/6c5b43f3bedeff9bc54ec838e50bed664561bb08
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-04 (Tue, 04 Nov 2014)

  Changed paths:
    M src/game_initialization/playcampaign.cpp

  Log Message:
  -----------
  fixup exception handler for replays

For some reason I had apparently set it up to skip writing errors
to stderr unless it was a unit test...


  Commit: 9e801244eae90f6141970bac0065dd105179e125
      https://github.com/wesnoth/wesnoth/commit/9e801244eae90f6141970bac0065dd105179e125
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-04 (Tue, 04 Nov 2014)

  Changed paths:
    M src/game_launcher.cpp

  Log Message:
  -----------
  add game::error handler to game_launcher.cpp, also mapgen errors

Put the same handlers I added to playcampaign also for
game_launcher. It can't be good that we weren't catching
game::error anywhere...


  Commit: 7e5632d36ceb35f9dbb3cbde7cc7533935f3fe5e
      https://github.com/wesnoth/wesnoth/commit/7e5632d36ceb35f9dbb3cbde7cc7533935f3fe5e
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-04 (Tue, 04 Nov 2014)

  Changed paths:
    M src/widgets/button.cpp

  Log Message:
  -----------
  button ctor throws game::error when it can't find its image

This partially reverts an earlier commit
28fe7e44

instead of changing the exception type to game::game_error,
(which I assume is meant for in-game errors?), we go back to
game::error which is now handled properly in playcampaign.cpp
and game_launcher.cpp

Tested that this does not reintroduce bug 22611.


  Commit: 2885a3a9b31ee34d0c2ea99e0064324df81ec19b
      https://github.com/wesnoth/wesnoth/commit/2885a3a9b31ee34d0c2ea99e0064324df81ec19b
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-04 (Tue, 04 Nov 2014)

  Changed paths:
    M src/game_initialization/playcampaign.cpp

  Log Message:
  -----------
  don't catch game::error in playcampaign.cpp


  Commit: 3787ec00c9d49d5f00bdd2036c736533c6bd88c1
      https://github.com/wesnoth/wesnoth/commit/3787ec00c9d49d5f00bdd2036c736533c6bd88c1
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-11-04 (Tue, 04 Nov 2014)

  Changed paths:
    M src/game_initialization/playcampaign.cpp

  Log Message:
  -----------
  use standard loggers instead of std::cerr


  Commit: 85e60b9147ef63ffbea96712c310a4a3d7122857
      https://github.com/wesnoth/wesnoth/commit/85e60b9147ef63ffbea96712c310a4a3d7122857
  Author: Chris Beck <beck.ct at gmail.com>
  Date:   2014-11-04 (Tue, 04 Nov 2014)

  Changed paths:
    M src/game_initialization/playcampaign.cpp
    M src/game_launcher.cpp
    M src/widgets/button.cpp

  Log Message:
  -----------
  Merge pull request #304 from cbeck88/fixup_exception_handlers

Fixup exception handlers


Compare: https://github.com/wesnoth/wesnoth/compare/49d3653ed936...85e60b9147ef


More information about the Commits mailing list