Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
failed conversion of enums results in error dialog, in debug mode
The make_enum macro header now includes wml_exception.hpp, and game_config. We use the FAIL macro to launch a transient twml_exception dialog when an enum is casted from an illegal string value. This means that when enums in our C++ classes are initialized using lexical_cast<enum_type> (cfg["attribute"]), we will automatically give error reports for bad values.
- Loading branch information
Showing
3 changed files
with
26 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters