This project is read-only.
1
Vote

Hidden MessageBox created even though IsRunningInSilentMode is true

description

When reaching an exception in GenerateXmlChanges [line 491], if the application config IsRunningInSilentMode, a UI MessageBox blocks the application. Particularly, if one runs this in an automation context, the process is blocked and must be manually terminated. I would suggest the following tweak in TFSChangeLog/Operations/Services/GenerateXmlChangesService.cs [line 491]:

catch (Exception ex)
            {
                m_ViewModel.progressDialogViewModel.TokenSource.Cancel();
                writer.Close();
                if (TFSChangeLog.DataAccess.TFSChangeLogStaticConfigs.IsRunningInSilentMode == false)
                {
                    MessageBox.Show(ex.Message, "Error",
                            MessageBoxButton.OK,
                            MessageBoxImage.Error,
                            MessageBoxResult.OK);
                }
                else
                {
                    System.Console.WriteLine("Exception: " + ex.Message + Environment.NewLine + ex.InnerException.ToString() + Environment.NewLine + ex.StackTrace);
                }
            }

comments