Enhanced IO issue handling when generating output

This commit is contained in:
tsommer committed 2022-11-01 19:24:27 +01:00
1 parent 53f98d4e3c
commit a19ad7dcdb
5 files changed
+67 -15

No files matched your search

@@ -331,7 +331,9 @@ public partial class SectionTree : UserControl
}
this.buttonGenerate.Enabled = false;
await Generator.TriggerAllAsync();
var result = await Generator.TriggerAllAsync();
result.ProcessError();
this.buttonGenerate.Enabled = true;
}
}
@@ -6,7 +6,8 @@ public static class ExtensionsError
{
public static void ProcessError<TResult>(this ProcessorResult<TResult> result)
{
if (result.Successful) return;
if (result.Successful)
return;
MessageBox.Show(result.ErrorMessage, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}