Skip to content

Commit

Permalink
Simplify sample alert dialogs (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjcollins authored Jun 24, 2024
1 parent 046fb32 commit 3fc3765
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions facebook/sample/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ async Task InitializeFacebookSdk()
}
catch (Exception ex)
{
await DisplayAlert("Unable to initialize Facebook SDK!", ex.ToString(), "OK");
await DisplayAlert("Unable to initialize Facebook SDK!", ex.Message, "OK");
}
}

Expand All @@ -46,7 +46,7 @@ async void OnAppEventClicked(object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Failed to send App Event!", ex.ToString(), "OK");
await DisplayAlert("Failed to send App Event!", ex.Message, "OK");
}
}
}
4 changes: 2 additions & 2 deletions firebase/macios/sample/AppTabbedPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public static void ConfigureFirebase(ContentPage page)
MauiFIRApp.AutoConfigure();
FirebaseConfigured = true;
}
catch (Exception ex)
catch (Exception)
{
page.DisplayAlert("Unable to configure Firebase app!", ex.ToString(), "OK");
page.DisplayAlert("Please configure your Firebase app.", "Possible missing or invalid GOOGLE_APP_ID in GoogleService-Info.plist.", "OK");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion firebase/macios/sample/FIRAnalyticsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async void OnAnalyticsClicked (object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Unable to log event!", ex.ToString(), "OK");
await DisplayAlert("Unable to log event!", ex.Message, "OK");
}
}
}
2 changes: 1 addition & 1 deletion firebase/macios/sample/FIRAuthPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async void OnCreateUserClicked (object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Unable to create user!", ex.ToString(), "OK");
await DisplayAlert("Unable to create user!", ex.Message, "OK");
}
}
}
2 changes: 1 addition & 1 deletion firebase/macios/sample/FIRMessagingPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async void OnRegisterClicked (object sender, EventArgs e)
}
catch (Exception ex)
{
await DisplayAlert("Unable to fetch app token!", ex.ToString(), "OK");
await DisplayAlert("Unable to fetch app token!", ex.Message, "OK");
}
}
}

0 comments on commit 3fc3765

Please sign in to comment.