if ((snd_info->data_ptr = Mix_LoadWAV(filename)) == NULL)
{
- Error(ERR_WARN, "cannot read sound file '%s'", filename);
+ Error(ERR_WARN, "cannot read sound file '%s': %s", filename, Mix_GetError());
free(snd_info);
return NULL;
}
if ((mod_info->data_ptr = Mix_LoadMUS(filename)) == NULL)
{
- Error(ERR_WARN, "cannot read music file '%s'", filename);
+ Error(ERR_WARN, "cannot read music file '%s': %s", filename, Mix_GetError());
free(mod_info);
return NULL;
}
Error(ERR_EXIT, "LoadCustomImage(): cannot find file '%s'", basename);
if ((new_bitmap = LoadImage(filename)) == NULL)
- Error(ERR_EXIT, "LoadImage() failed: %s", GetError());
+ Error(ERR_EXIT, "LoadImage('%s') failed: %s", basename, GetError());
return new_bitmap;
}
if ((new_bitmap = LoadImage(filename)) == NULL)
{
- Error(ERR_WARN, "LoadImage() failed: %s", GetError());
+ Error(ERR_WARN, "LoadImage('%s') failed: %s", basename, GetError());
return;
}