mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
EnumReader now warns about the correct string,
parse_enum function throws if the string can not be parsed git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1341 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -411,3 +411,17 @@ template <> void Reader::handle(FileName& f) {
|
||||
handle(static_cast<String&>(f));
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------- : EnumReader
|
||||
|
||||
void EnumReader::warnIfNotDone(Reader* errors_to) {
|
||||
if (!done) {
|
||||
// warning: unknown value
|
||||
errors_to->warning(_ERROR_1_("unrecognized value", read));
|
||||
}
|
||||
}
|
||||
void EnumReader::errorIfNotDone() {
|
||||
if (!done) {
|
||||
throw ParseError(_ERROR_1_("unrecognized value", read));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user