diff --git a/StabilityMatrix.Avalonia/Extensions/RelayCommandExtensions.cs b/StabilityMatrix.Avalonia/Extensions/RelayCommandExtensions.cs index bbbdf8c4..7f88704d 100644 --- a/StabilityMatrix.Avalonia/Extensions/RelayCommandExtensions.cs +++ b/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; } };