public static ReactiveCommand <T1, T2> SetupErrorHandling <T1, T2>(this ReactiveCommand <T1, T2> command, CompositeDisposable disposable) { command.ThrownExceptions .Subscribe(async ex => await Application.Current.MainPage.DisplayAlert("Error running command", ex.Message, "OK")) .DisposeWith(disposable); command.DisposeWith(disposable); return(command); }