Skip to content

Commit

Permalink
Improve error message in text resource format parser
Browse files Browse the repository at this point in the history
This improves the error message in our text resource parsing code to
help the user potentially fix parsing issues in case of failure. It also
helps with the debugging process of finding out which sub_resource is
causing the parser to fail with line messages.
  • Loading branch information
Eoin-ONeill-Yokai committed Jan 2, 2024
1 parent 07b8860 commit 2283e07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/resources/resource_format_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourcePars
if (error == ERR_FILE_MISSING_DEPENDENCIES) {
// Resource loading error, just skip it.
} else if (error != ERR_FILE_EOF) {
_printerr();
ERR_PRINT(vformat("Parse Error: %s. [Resource file %s:%d]", error_names[error], res_path, lines));
return Ref<PackedScene>();
} else {
error = OK;
Expand Down

0 comments on commit 2283e07

Please sign in to comment.