Browse Source

Use inner exceptions for relay notification errors

pull/165/head
Ionite 1 year ago
parent
commit
601b8ff4f5
No known key found for this signature in database
  1. 6
      StabilityMatrix.Avalonia/Extensions/RelayCommandExtensions.cs

6
StabilityMatrix.Avalonia/Extensions/RelayCommandExtensions.cs

@ -48,7 +48,7 @@ public static class RelayCommandExtensions
&& senderCommand.ExecutionTask is { Exception: { } exception }
)
{
onError(exception);
onError(exception.InnerException ?? exception);
}
};
@ -80,6 +80,10 @@ public static class RelayCommandExtensions
&& senderCommand.ExecutionTask is { Exception: { } exception }
)
{
if (exception.InnerException != null)
{
throw exception.InnerException;
}
throw exception;
}
};

Loading…
Cancel
Save