at least not crash in case of TIFF warnings/errors in Unicode build (but we still don't show them correctly neither)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-06-24 12:29:22 +00:00
parent 85272533a2
commit e4f0e73d60

View File

@ -140,16 +140,28 @@ static void
TIFFwxWarningHandler(const char* module, const char* fmt, va_list ap)
{
if (module != NULL)
wxLogWarning(_("tiff module: %s"), module);
wxVLogWarning((wxChar *) fmt, ap);
wxLogWarning(_("tiff module: %s"), wxString::FromAscii(module).c_str());
// FIXME: this is not terrible informative but better than crashing!
#if wxUSE_UNICODE
wxLogWarning(_("TIFF library warning."));
#else
wxVLogWarning(fmt, ap);
#endif
}
static void
TIFFwxErrorHandler(const char* module, const char* fmt, va_list ap)
{
if (module != NULL)
wxLogError(_("tiff module: %s"), module);
wxVLogError((wxChar *) fmt, ap);
wxLogError(_("tiff module: %s"), wxString::FromAscii(module).c_str());
// FIXME: as above
#if wxUSE_UNICODE
wxLogError(_("TIFF library error."));
#else
wxVLogError(fmt, ap);
#endif
}
} // extern "C"