Skip to content

Commit

Permalink
update shim signature exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tonerdo committed Jan 8, 2018
1 parent c90e4a6 commit 30bf786
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Pose/Helpers/ShimHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ 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");

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");
}
}

Expand Down

0 comments on commit 30bf786

Please sign in to comment.