diff --git a/src/SoapCore/Meta/MetaBodyWriter.cs b/src/SoapCore/Meta/MetaBodyWriter.cs index 830b0773..9a32f67a 100644 --- a/src/SoapCore/Meta/MetaBodyWriter.cs +++ b/src/SoapCore/Meta/MetaBodyWriter.cs @@ -121,7 +121,8 @@ private static Type GetMessageContractBodyType(Type type) { if (!TryGetMessageContractBodyType(type, out var bodyType)) { - throw new InvalidOperationException(nameof(type)); + throw new InvalidOperationException( + $"Could not get {nameof(PropertyInfo)} or {nameof(FieldInfo)} of custom {nameof(MessageBodyMemberAttribute)} from custom {nameof(MessageContractAttribute)} of type: {type}"); } return bodyType; @@ -131,7 +132,8 @@ private static string GetMessageContractBodyName(Type type) { if (!TryGetMessageContractBodyMemberInfo(type, out var memberInfo)) { - throw new InvalidOperationException(nameof(type)); + throw new InvalidOperationException( + $"Could not get {nameof(MemberInfo)} of custom {nameof(MessageBodyMemberAttribute)} from custom {nameof(MessageContractAttribute)} of type: {type}"); } return memberInfo.Name;