From 30bf7861dc36304ec28081faf8018c01e7ebe1c3 Mon Sep 17 00:00:00 2001 From: Oluwatoni Solarin-Sodara Date: Mon, 8 Jan 2018 15:05:54 -0700 Subject: [PATCH] update shim signature exception messages --- src/Pose/Helpers/ShimHelper.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pose/Helpers/ShimHelper.cs b/src/Pose/Helpers/ShimHelper.cs index 7bffce2..1b1df7d 100644 --- a/src/Pose/Helpers/ShimHelper.cs +++ b/src/Pose/Helpers/ShimHelper.cs @@ -71,7 +71,7 @@ public static void ValidateReplacementMethodSignature(MethodBase original, Metho } if ((isValueType && !isStaticOrConstructor ? validOwningType.MakeByRefType() : validOwningType) != shimOwningType) - throw new InvalidShimSignatureException("Mismatched owning types"); + throw new InvalidShimSignatureException("Mismatched instance types"); if (validParameterTypes.Count() != shimParameterTypes.Count()) throw new InvalidShimSignatureException("Parameters count do not match"); @@ -79,7 +79,7 @@ public static void ValidateReplacementMethodSignature(MethodBase original, Metho for (int i = 0; i < validParameterTypes.Count(); i++) { if (validParameterTypes.ElementAt(i) != shimParameterTypes.ElementAt(i)) - throw new InvalidShimSignatureException($"Parameter type at {i} do not match"); + throw new InvalidShimSignatureException($"Parameter types at {i} do not match"); } }