Esempio n. 1
0
        internal static void DisplayException(InvalidOperationException exception)
        {
            var           title   = "Invalid operation exception";
            StringBuilder content = new StringBuilder();

            content.AppendLine("There is a problem with data binding in the body:");
            content.AppendFormat("Exception: {0}\n\n", exception.Message);
            MessageDialogHelper.ShowDialogAsync(content.ToString(), title);
        }
Esempio n. 2
0
        internal static void DisplayException(FormatException exception)
        {
            var           title   = "Format exception";
            StringBuilder content = new StringBuilder();

            content.AppendLine("There is a problem with the format of the message:");
            content.AppendFormat("Exception: {0}\n\n", exception.Message);
            MessageDialogHelper.ShowDialogAsync(content.ToString(), title);
        }
Esempio n. 3
0
        internal static void DisplayException(MissingConfigurationValueException 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);
        }
Esempio n. 4
0
        // 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());
        }