Merge pull request #251 from arthrp/master
Better wording for error message
This commit is contained in:
Коммит
12b313ae9c
|
@ -138,7 +138,7 @@ namespace BenchmarkDotNet.Running
|
|||
while (declaringType != null)
|
||||
{
|
||||
if (!declaringType.GetTypeInfo().IsPublic && !declaringType.GetTypeInfo().IsNestedPublic)
|
||||
throw new InvalidOperationException($"{methodType} method {methodInfo.Name} defined within type {declaringType.FullName} has incorrect access modifiers.\nDeclaring type must be public.");
|
||||
throw new InvalidOperationException($"{declaringType.FullName} containing {methodType} method {methodInfo.Name} has incorrect access modifiers.\nDeclaring type must be public.");
|
||||
|
||||
declaringType = declaringType.DeclaringType;
|
||||
}
|
||||
|
@ -150,4 +150,4 @@ namespace BenchmarkDotNet.Running
|
|||
throw new InvalidOperationException($"{methodType} method {methodInfo.Name} is generic.\nGeneric {methodType} methods are not supported.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче