process other queued exports even if one fails and show error message

This commit is contained in:
LukeFZ
2025-02-08 17:42:10 +01:00
parent ffb1996252
commit d87a6ef3e3

View File

@@ -199,10 +199,18 @@ public class UiContext
var model = _appModels[0];
foreach (var queuedExport in _queuedExports)
{
try
{
var outputFormat = OutputFormatRegistry.GetOutputFormat(queuedExport.FormatId);
await outputFormat.Export(model, client, queuedExport.OutputDirectory, queuedExport.Settings);
}
catch (Exception ex)
{
await client.ShowErrorToast($"Export for format {queuedExport.FormatId} failed: {ex}",
cancellationToken);
}
}
_queuedExports.Clear();
}