Improve error message when a field is missing from a subtitle line

Originally committed to SVN as r6078.
This commit is contained in:
Thomas Goyne 2011-12-22 21:21:38 +00:00
parent 776c7e69a8
commit 38ffdc4135
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ namespace {
DEFINE_SIMPLE_EXCEPTION_NOINNER(BadField, Automation4::MacroRunError, "automation/macro/bad_field")
BadField bad_field(const char *expected_type, const char *name, const char *line_clasee)
{
return BadField(std::string("Invalid ") + expected_type + " '" + name + "' field in '" + line_clasee + "' class subtitle line");
return BadField(std::string("Invalid or missing field '") + name + "' in '" + line_clasee + "' class subtitle line (expected " + expected_type + ")");
}
wxString get_string_field(lua_State *L, const char *name, const char *line_class)