mirror of
https://github.com/godotengine/godot.git
synced 2025-11-03 15:11:19 +00:00
[Core] Improve error messages with vformat
This commit is contained in:
parent
8004c7524f
commit
38f9769bc6
49 changed files with 292 additions and 292 deletions
|
|
@ -116,7 +116,7 @@ void ZipArchive::close_handle(unzFile p_file) const {
|
|||
}
|
||||
|
||||
unzFile ZipArchive::get_file_handle(const String &p_file) const {
|
||||
ERR_FAIL_COND_V_MSG(!file_exists(p_file), nullptr, "File '" + p_file + " doesn't exist.");
|
||||
ERR_FAIL_COND_V_MSG(!file_exists(p_file), nullptr, vformat("File '%s' doesn't exist.", p_file));
|
||||
File file = files[p_file];
|
||||
|
||||
zlib_filefunc_def io;
|
||||
|
|
@ -136,7 +136,7 @@ unzFile ZipArchive::get_file_handle(const String &p_file) const {
|
|||
io.free_mem = godot_free;
|
||||
|
||||
unzFile pkg = unzOpen2(packages[file.package].filename.utf8().get_data(), &io);
|
||||
ERR_FAIL_NULL_V_MSG(pkg, nullptr, "Cannot open file '" + packages[file.package].filename + "'.");
|
||||
ERR_FAIL_NULL_V_MSG(pkg, nullptr, vformat("Cannot open file '%s'.", packages[file.package].filename));
|
||||
int unz_err = unzGoToFilePos(pkg, &file.file_pos);
|
||||
if (unz_err != UNZ_OK || unzOpenCurrentFile(pkg) != UNZ_OK) {
|
||||
unzClose(pkg);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue