add exc handler to RCommands
MODIFY
WalletWasabi.Gui/Controls/ExtendedTextBox.cs
WalletWasabi.Gui/Controls/ExtendedTextBox.cs
@@ -19,16 +19,19 @@ namespace WalletWasabi.Gui.Controls
public ExtendedTextBox()
{
- CopyCommand = ReactiveCommand.Create(async () =>
+ CopyCommand = ReactiveCommand.CreateFromTask(async () =>
{
await CopyAsync();
});
- PasteCommand = ReactiveCommand.Create(async () =>
+ PasteCommand = ReactiveCommand.CreateFromTask(async () =>
{
await PasteAsync();
});
+ CopyCommand.ThrownExceptions.Subscribe(ex => Logging.Logger.LogWarning<ExtendedTextBox>(ex));
+ PasteCommand.ThrownExceptions.Subscribe(ex => Logging.Logger.LogWarning<ExtendedTextBox>(ex));
+
this.GetObservable(IsReadOnlyProperty).Subscribe(isReadOnly =>
{
if (ContextMenu is null) return;

add exc handler to RCommands