mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
pi: treat cancellations as errors(fixes #1825)
This commit is contained in:
parent
16f0fb76f4
commit
38eac377a1
1 changed files with 11 additions and 10 deletions
|
|
@ -364,10 +364,13 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
/// <returns>A value indicating whether to continue with the next task.</returns>
|
||||
public bool DisplayErrorContinuation(Task task, object state)
|
||||
{
|
||||
if (task.IsFaulted)
|
||||
{
|
||||
var errorModalMessage = state as string;
|
||||
if (!task.IsFaulted && !task.IsCanceled)
|
||||
return true;
|
||||
|
||||
var newErrorMessage = state as string;
|
||||
|
||||
if (task.Exception != null)
|
||||
{
|
||||
foreach (var ex in task.Exception.InnerExceptions)
|
||||
{
|
||||
if (ex is PluginException)
|
||||
|
|
@ -375,7 +378,7 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
Log.Error(ex, "Plugin installer threw an error");
|
||||
#if DEBUG
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
errorModalMessage += $"\n\n{ex.Message}";
|
||||
newErrorMessage += $"\n\n{ex.Message}";
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
|
@ -383,17 +386,15 @@ internal class PluginInstallerWindow : Window, IDisposable
|
|||
Log.Error(ex, "Plugin installer threw an unexpected error");
|
||||
#if DEBUG
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
errorModalMessage += $"\n\n{ex.Message}";
|
||||
newErrorMessage += $"\n\n{ex.Message}";
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
this.ShowErrorModal(errorModalMessage);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
this.ShowErrorModal(newErrorMessage ?? "An unknown error occurred.");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void SetOpenPage(PluginInstallerOpenKind kind)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue