Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected sealed override object Invoke(object thisObject, object[] arguments, B
{
result = _action(thisObject, convertedArguments, _thisType);
}
catch (Exception e) when (wrapInTargetInvocationException && ((_options & InvokerOptions.DontWrapException) == 0))
catch (Exception e) when (wrapInTargetInvocationException)
{
throw new TargetInvocationException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ internal enum InvokerOptions
{
None = 0x00000000,
AllowNullThis = 0x00000001, // Don't raise an exception if the "thisObject" parameter to Invoker is null.
DontWrapException = 0x00000002, // Don't wrap target exceptions in TargetInvocationException.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ internal sealed override IEnumerable<RuntimeConstructorInfo> SyntheticConstructo
SyntheticMethodId.ArrayCtor,
arrayType,
ctorParameters,
InvokerOptions.AllowNullThis | InvokerOptions.DontWrapException,
InvokerOptions.AllowNullThis,
delegate (object _this, object[] args, Type thisType)
{
int[] lengths = new int[rank];
Expand Down Expand Up @@ -109,7 +109,7 @@ internal sealed override IEnumerable<RuntimeConstructorInfo> SyntheticConstructo
SyntheticMethodId.ArrayCtorJagged + parameterCount,
arrayType,
ctorParameters,
InvokerOptions.AllowNullThis | InvokerOptions.DontWrapException,
InvokerOptions.AllowNullThis,
delegate (object _this, object[] args, Type thisType)
{
int[] lengths = new int[args.Length];
Expand Down Expand Up @@ -145,7 +145,7 @@ internal sealed override IEnumerable<RuntimeConstructorInfo> SyntheticConstructo
SyntheticMethodId.ArrayMultiDimCtor,
arrayType,
ctorParameters,
InvokerOptions.AllowNullThis | InvokerOptions.DontWrapException,
InvokerOptions.AllowNullThis,
delegate (object _this, object[] args, Type thisType)
{
int[] lengths = new int[rank];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ public void Invoke_OneDimensionalArray()

[Fact]
[ActiveIssue("https://github.com/dotnet/runtime/issues/67457", TestRuntimes.Mono)]
[ActiveIssue("https://github.com/dotnet/runtime/issues/69336", typeof(PlatformDetection), nameof(PlatformDetection.IsNativeAot))]
public void Invoke_OneDimensionalArray_NegativeLengths_ThrowsOverflowException()
{
ConstructorInfo[] constructors = GetConstructors(typeof(object[]));
Expand Down