Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error when scene/resource is saved with newer format #90571

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,9 @@ void EditorNode::_dialog_display_load_error(String p_file, Error p_error) {
case ERR_FILE_NOT_FOUND: {
show_accept(vformat(TTR("Missing file '%s' or one of its dependencies."), p_file.get_file()), TTR("OK"));
} break;
case ERR_FILE_UNRECOGNIZED: {
show_accept(vformat(TTR("File '%s' is saved in a format that is newer than the formats supported by this version of Godot, so it can't be opened."), p_file.get_file()), TTR("OK"));
} break;
default: {
show_accept(vformat(TTR("Error while loading file '%s'."), p_file.get_file()), TTR("OK"));
} break;
Expand Down Expand Up @@ -6642,6 +6645,8 @@ EditorNode::EditorNode() {
main_menu->set_menu_tooltip(0, TTR("Operations with scene files."));

accept = memnew(AcceptDialog);
accept->set_autowrap(true);
accept->set_min_size(Vector2i(600, 0));
accept->set_unparent_when_invisible(true);

save_accept = memnew(AcceptDialog);
Expand Down
2 changes: 1 addition & 1 deletion scene/resources/resource_format_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,7 +1067,7 @@ void ResourceLoaderText::open(Ref<FileAccess> p_f, bool p_skip_first_tag) {
if (fmt > FORMAT_VERSION) {
error_text = "Saved with newer format version";
_printerr();
error = ERR_PARSE_ERROR;
error = ERR_FILE_UNRECOGNIZED;
return;
}
}
Expand Down
Loading