Skip to content

Commit

Permalink
Update CastleProxyFactory.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
abatishchev authored and stakx committed Mar 21, 2022
1 parent 0242d84 commit b50a8a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Moq/Interception/CastleProxyFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public override object CreateProxy(Type mockType, Moq.IInterceptor interceptor,
}
catch (TypeLoadException e)
{
throw new ArgumentException(Resources.TypeNotMockable, e);
throw new ArgumentException(string.Format(Resources.TypeNotMockable, mockType), e);
}
catch (MissingMethodException e)
{
Expand Down Expand Up @@ -257,7 +257,7 @@ public static object DynamicInvokeNonVirtually(MethodInfo method, object instanc
// unfortunately that doesn't work. `DeclaredOnly` does not have the desired effect.
//
// * We could get a function pointer via `method.MethodHandle.GetFunctionPointer()`,
// then construct a delegate for it (see ECMA-335 §II.14.4). This does not work
// then construct a delegate for it (see ECMA-335 §II.14.4). This does not work
// because the delegate signature would have to have a matching parameter list,
// not just an untyped `object[]`. It also doesn't work because we don't always have
// a suitable delegate type ready (e.g. when a method has by-ref parameters).
Expand Down

0 comments on commit b50a8a1

Please sign in to comment.