Improve error reporting in the asset library and in related types
This also makes errors related to asset image loading verbose-only, because, frankly, users can't do much about those errors. Spamming them with error messages about some assets on the frontend being broken is pointless.
This commit is contained in:
@@ -81,7 +81,7 @@ void ImageFormatLoaderExtension::_bind_methods() {
|
||||
}
|
||||
|
||||
Error ImageLoader::load_image(String p_file, Ref<Image> p_image, Ref<FileAccess> p_custom, BitField<ImageFormatLoader::LoaderFlags> p_flags, float p_scale) {
|
||||
ERR_FAIL_COND_V_MSG(p_image.is_null(), ERR_INVALID_PARAMETER, "It's not a reference to a valid Image object.");
|
||||
ERR_FAIL_COND_V_MSG(p_image.is_null(), ERR_INVALID_PARAMETER, "Can't load an image: invalid Image object.");
|
||||
|
||||
Ref<FileAccess> f = p_custom;
|
||||
if (f.is_null()) {
|
||||
|
||||
Reference in New Issue
Block a user