Skip to content

Commit 68823cd

Browse files
tmatjasonmalinowski
authored andcommitted
Fix test helper message to avoid NRE (#78532)
1 parent 1ed374a commit 68823cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Workspaces/CoreTestUtilities/ObjectExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static object GetFieldValue(this object instance, string fieldName)
4646

4747
if (fieldInfo == null)
4848
{
49-
throw new FieldAccessException("Field " + fieldName + " was not found on type " + type.ToString());
49+
throw new FieldAccessException($"Field '{fieldName}' was not found on type '{instance.GetType()}'");
5050
}
5151

5252
var result = fieldInfo.GetValue(instance);

0 commit comments

Comments
 (0)