diff options
author | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-08-31 20:47:36 +0300 |
---|---|---|
committer | Andrii Doroshenko (Xrayez) <xrayez@gmail.com> | 2019-09-01 14:16:17 +0300 |
commit | cd99157e2e524b6546f574cac19c49b554057dfb (patch) | |
tree | 43a7502f53a81d39c0821057ce35b0a63fae85a3 /drivers | |
parent | b17b51d9701459d43da7c6766642762649802ff0 (diff) |
Provide error messages when PNG save fails
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/png/resource_saver_png.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/png/resource_saver_png.cpp b/drivers/png/resource_saver_png.cpp index 7a2eeafdc3..3b3f1506dc 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<Image> &p_img PoolVector<uint8_t> 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<uint8_t>::Read reader = buffer.read(); |