]> git.saurik.com Git - wxWidgets.git/commit
Improve error messages from wxImage::LoadFile().
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Nov 2010 00:42:35 +0000 (00:42 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 24 Nov 2010 00:42:35 +0000 (00:42 +0000)
commit3f74b7aeb69624c0b0aabb1ab01d241a80063ebd
treef7840ca3bb357188a1afe23475714c0ce1679c25
parent737883f20a97658d4d94f8dfbcf2062209c39a28
Improve error messages from wxImage::LoadFile().

The error given when loading an image file failed was not very useful because
they didn't specify which file exactly we failed to load and also because the
numeric handler type which means nothing at all to the end user (and not much
to the developer) was used.

Use the description of the file format instead and also always give the name
of the file that we failed to load.

Finally, remove the test for file existence: this is one of many reasons why
opening the file could fail and it doesn't make sense to handle it specially,
just let the underlying stream generate the appropriate error message in all
cases.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
src/common/image.cpp