You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
[Core] Improve error messages with vformat
This commit is contained in:
@@ -98,7 +98,7 @@ void ResourceFormatSaver::_bind_methods() {
|
||||
}
|
||||
|
||||
Error ResourceSaver::save(const Ref<Resource> &p_resource, const String &p_path, uint32_t p_flags) {
|
||||
ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, "Can't save empty resource to path '" + p_path + "'.");
|
||||
ERR_FAIL_COND_V_MSG(p_resource.is_null(), ERR_INVALID_PARAMETER, vformat("Can't save empty resource to path '%s'.", p_path));
|
||||
String path = p_path;
|
||||
if (path.is_empty()) {
|
||||
path = p_resource->get_path();
|
||||
|
||||
Reference in New Issue
Block a user