qbsp, maputil: add parser location to "brush primitives" error messages
This commit is contained in:
parent
3969f857cb
commit
bf50e0d604
|
|
@ -1080,13 +1080,13 @@ void map_entity_t::parse_brush(parser_t &parser)
|
|||
// optional
|
||||
if (parser.token == "brushDef") {
|
||||
if (!parser.parse_token()) {
|
||||
FError("Brush primitives: unexpected EOF (nothing after brushDef)");
|
||||
FError("{}: Brush primitives: unexpected EOF (nothing after brushDef)", parser.location);
|
||||
}
|
||||
}
|
||||
|
||||
// mandatory
|
||||
if (parser.token != "{") {
|
||||
FError("Brush primitives: expected second {{ at beginning of brush, got \"{}\"", parser.token);
|
||||
FError("{}: Brush primitives: expected second {{ at beginning of brush, got \"{}\"", parser.location, parser.token);
|
||||
}
|
||||
}
|
||||
// ericw -- end brush primitives
|
||||
|
|
@ -1110,7 +1110,7 @@ void map_entity_t::parse_brush(parser_t &parser)
|
|||
if (!parser.parse_token()) {
|
||||
FError("Brush primitives: unexpected EOF (no closing brace)");
|
||||
} else if (parser.token != "}") {
|
||||
FError("Brush primitives: Expected }}, got: {}", parser.token);
|
||||
FError("{}: Brush primitives: Expected }}, got: {}", parser.location, parser.token);
|
||||
}
|
||||
}
|
||||
// ericw -- end brush primitives
|
||||
|
|
|
|||
|
|
@ -2516,12 +2516,12 @@ static mapbrush_t ParseBrush(parser_t &parser, mapentity_t &entity, texture_def_
|
|||
// optional
|
||||
if (parser.token == "brushDef") {
|
||||
if (!parser.parse_token())
|
||||
FError("Brush primitives: unexpected EOF (nothing after brushDef)");
|
||||
FError("{}: Brush primitives: unexpected EOF (nothing after brushDef)", parser.location);
|
||||
}
|
||||
|
||||
// mandatory
|
||||
if (parser.token != "{")
|
||||
FError("Brush primitives: expected second {{ at beginning of brush, got \"{}\"", parser.token);
|
||||
FError("{}: Brush primitives: expected second {{ at beginning of brush, got \"{}\"", parser.location, parser.token);
|
||||
}
|
||||
// ericw -- end brush primitives
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue