private void BtnThrowException_Clicked(object sender, EventArgs e) { try { throw new Exception("custom exception is thrown!!!"); } catch (Exception exception) { MvvmMessagingCenter.SendException(this, exception); //subcriber is auto change to currentPage } }
private async void BtnDyncmc_Clicked(object sender, EventArgs e) { try { throw new Exception("redirected custom exception to another page!!!"); } catch (Exception exception) { MvvmMessagingCenter.SendException(this, exception); //subcriber is auto change to currentPage await Navigation.PushAsync(new ExceptionPage()); } }