// Display details of the exception. // We are doing this here to help you, as a developer, understand exactly // what exception was received. In a real app, you would // handle exceptions within your code and give a more user-friendly behavior. internal static void DisplayException(Exception exception) { var title = "Connected Services configuration failure"; StringBuilder content = new StringBuilder(); content.AppendLine("We were unable to connect to Office 365. Here's the exception we received:"); content.AppendFormat("Exception: {0}\n\n", exception.Message); content.AppendLine("Suggestion: Make sure you have added the Connected Services to this project as outlined in the Readme file."); MessageDialogHelper.ShowDialogAsync(content.ToString(), title); }
// Display details of the exception in a message dialog. // We are doing this here to help you, as a developer, understand exactly // what exception was received. In a real app, you would // handle exceptions within your code and give a more user-friendly behavior. internal static void DisplayException(AuthenticationFailedException exception) { var title = "Authentication failed"; StringBuilder content = new StringBuilder(); content.AppendLine("We were unable to connect to Office 365. Here's the exception we received:"); content.AppendFormat("Exception: {0}\n", exception.ErrorCode); content.AppendFormat("Description: {0}\n\n", exception.ErrorDescription); content.AppendLine("Suggestion: Make sure you have added the Connected Services to this project as outlined in the Readme file"); MessageDialogHelper.ShowDialogAsync(content.ToString(), title); Debug.WriteLine(content.ToString()); }