diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index 7a2eeafdc3e..3b3f1506dc4 100644 --- a/drivers/png/resource_saver_png.cpp +++ b/drivers/png/resource_saver_png.cpp @@ -53,9 +53,9 @@ Error ResourceSaverPNG::save_image(const String &p_path, const Ref &p_img PoolVector buffer; Error err = PNGDriverCommon::image_to_png(p_img, buffer); - ERR_FAIL_COND_V(err, err); + ERR_FAIL_COND_V_MSG(err, err, "Can't convert image to PNG."); FileAccess *file = FileAccess::open(p_path, FileAccess::WRITE, &err); - ERR_FAIL_COND_V(err, err); + ERR_FAIL_COND_V_MSG(err, err, vformat("Can't save PNG at path: '%s'.", p_path)); PoolVector::Read reader = buffer.read();