diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-10-05 20:30:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-05 20:30:24 +0200 |
commit | 437a9393b741e182d0ca6ecfb65d9f0c1430d955 (patch) | |
tree | 073e3ad58c3b4c5a0de18c504c62f8e57ec06af7 | |
parent | 7d312448ad92f6af4831fb198cabe27cd350fda7 (diff) | |
parent | e35bb04c53e977f7353e9f377076cef71aaa6b0b (diff) |
Merge pull request #42571 from akien-mga/fix-binary-format-load-error
Improve format version mismatch error in binary loader
-rw-r--r-- | core/io/resource_format_binary.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 5097f6d98b..21de7835ce 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -863,7 +863,8 @@ void ResourceLoaderBinary::open(FileAccess *p_f) { if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) { f->close(); - ERR_FAIL_MSG("File format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a new engine version: " + local_path + "."); + ERR_FAIL_MSG(vformat("File '%s' can't be loaded, as it uses a format version (%d) or engine version (%d.%d) which are not supported by your engine version (%s).", + local_path, ver_format, ver_major, ver_minor, VERSION_BRANCH)); } type = get_unicode_string(); @@ -1136,7 +1137,9 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons if (ver_format > FORMAT_VERSION || ver_major > VERSION_MAJOR) { memdelete(f); memdelete(fw); - ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "File format '" + itos(FORMAT_VERSION) + "." + itos(ver_major) + "." + itos(ver_minor) + "' is too new! Please upgrade to a new engine version: " + local_path + "."); + ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, + vformat("File '%s' can't be loaded, as it uses a format version (%d) or engine version (%d.%d) which are not supported by your engine version (%s).", + local_path, ver_format, ver_major, ver_minor, VERSION_BRANCH)); } // Since we're not actually converting the file contents, leave the version |