コード例 #1
0
        private void ShowError(Exception exc)
        {
            var       aggregate      = exc as AggregateException;
            Exception innerException = aggregate == null ? exc : aggregate.Flatten().InnerException;

            if (innerException is TestWasSelectedToMutateException)
            {
                _svc.Logging.ShowError(UserMessages.ErrorBadMethodSelected(), _viewModel.View);
            }
            else if (innerException is StrongNameSignedAssemblyException)
            {
                _svc.Logging.ShowError(UserMessages.ErrorStrongNameSignedAssembly(), _viewModel.View);
            }
            else if (innerException is TestsLoadingException)
            {
                _svc.Logging.ShowError(UserMessages.ErrorTestsLoading() + " " + innerException, _viewModel.View);
            }
            else
            {
                _svc.Logging.ShowError(innerException, _viewModel.View);
            }
        }