Merge pull request #632 from daemitus/errors

This commit is contained in:
goaaats 2021-10-09 21:40:10 +02:00 committed by GitHub
commit d3132a5d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1827,7 +1827,14 @@ namespace Dalamud.Interface.Internal.Windows
if (!hasImages)
{
this.pluginImagesMap.Add(manifest.InternalName, Array.Empty<TextureWrap>());
Task.Run(async () => await this.DownloadPluginImagesAsync(plugin, manifest, isThirdParty));
Task.Run(async () => await this.DownloadPluginImagesAsync(plugin, manifest, isThirdParty))
.ContinueWith(task =>
{
if (task.IsFaulted)
{
Log.Error(task.Exception.InnerException, "An unhandled exception occurred in the plugin image downloader");
}
});
return false;
}
@ -2093,6 +2100,11 @@ namespace Dalamud.Interface.Internal.Windows
Log.Error($"Plugin icon for {manifest.InternalName} has an Invalid URI");
return;
}
catch (Exception ex)
{
Log.Error(ex, $"An unexpected error occurred with the icon for {manifest.InternalName}");
return;
}
if (data.StatusCode == HttpStatusCode.NotFound)
return;
@ -2202,6 +2214,11 @@ namespace Dalamud.Interface.Internal.Windows
Log.Error($"Plugin image{i + 1} for {manifest.InternalName} has an Invalid URI");
continue;
}
catch (Exception ex)
{
Log.Error(ex, $"An unexpected error occurred with image{i + 1} for {manifest.InternalName}");
continue;
}
if (data.StatusCode == HttpStatusCode.NotFound)
continue;