better error messages, when possible

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-10-06 11:00:50 +00:00
parent 3b211af168
commit 8cc0450796

View File

@@ -118,7 +118,8 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
if (!loader) if (!loader)
{ {
wxLogDebug(wxT("Could not create the loader for '%s' animation type"), anim_type); wxLogDebug(wxT("Could not create the loader for '%s' animation type: %s"),
anim_type, error->message);
return false; return false;
} }
@@ -135,7 +136,7 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
if (!gdk_pixbuf_loader_write(loader, buf, stream.LastRead(), &error)) if (!gdk_pixbuf_loader_write(loader, buf, stream.LastRead(), &error))
{ {
gdk_pixbuf_loader_close(loader, &error); gdk_pixbuf_loader_close(loader, &error);
wxLogDebug(wxT("Could not write to the loader")); wxLogDebug(wxT("Could not write to the loader: %s"), error->message);
return false; return false;
} }
} }
@@ -143,7 +144,7 @@ bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
// load complete // load complete
if (!gdk_pixbuf_loader_close(loader, &error)) if (!gdk_pixbuf_loader_close(loader, &error))
{ {
wxLogDebug(wxT("Could not close the loader")); wxLogDebug(wxT("Could not close the loader: %s"), error->message);
return false; return false;
} }