Skip to content

Conversation

daveMueller
Copy link
Collaborator

closes #459

@daveMueller
Copy link
Collaborator Author

image

@MarcoRossignoli MarcoRossignoli added the enhancement General enhancement request label Sep 26, 2019
{
var testModules = sessionStartEventArgs.GetPropertyValue<IEnumerable<string>>(CoverletConstants.TestSourcesPropertyName);
if (_eqtTrace.IsInfoEnabled)
IEnumerable<string> testModules;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not

 private IEnumerable<string> GetTestModules(SessionStartEventArgs sessionStartEventArgs)
        {
            try
            {
                IEnumerable<string> testModules = GetPropertyValueWrapper(sessionStartEventArgs);
                if (_eqtTrace.IsInfoEnabled)
                {
                    _eqtTrace.Info("{0}: TestModules: '{1}'",
                        CoverletConstants.DataCollectorName,
                        string.Join(",", testModules ?? Enumerable.Empty<string>()));
                }
                return testModules;
            }
            catch (MissingMethodException ex)
            {
                throw new MissingMethodException("Make sure to use .NET core SDK Version >= 2.2.300", ex);
            }
        }

Copy link
Collaborator

@MarcoRossignoli MarcoRossignoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@MarcoRossignoli MarcoRossignoli merged commit 0614f87 into coverlet-coverage:master Sep 30, 2019
@daveMueller daveMueller deleted the 459_ImproveExceptionMessage branch October 1, 2019 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve exception message for sdk that doesn't support collectors
2 participants