Clean up aggregate exception handling

This commit is contained in:
Asriel Camora
2023-10-25 13:11:11 -07:00
parent 2f36093453
commit fe187d9ae1
+3
View File
@@ -1390,6 +1390,9 @@ public sealed class MacroEditor : Window, IDisposable
} }
catch (AggregateException e) catch (AggregateException e)
{ {
if (e.InnerExceptions.Count == 1)
popupImportError = e.InnerExceptions[0].Message;
else
popupImportError = e.Message; popupImportError = e.Message;
Log.Error(e, "Retrieving macro failed"); Log.Error(e, "Retrieving macro failed");
} }