Merge branch 'master' into merge/release/3.0-preview4-to-master\n\nCommit migrated from dfc63baaa2
This commit is contained in:
commit
ec70b7a42b
|
|
@ -403,16 +403,20 @@ namespace Microsoft.Extensions.Internal
|
|||
}
|
||||
}
|
||||
|
||||
#if NETCOREAPP3_0
|
||||
return _constructor.Invoke(BindingFlags.DoNotWrapExceptions, binder: null, parameters: _parameterValues, culture: null);
|
||||
#else
|
||||
try
|
||||
{
|
||||
return _constructor.Invoke(_parameterValues);
|
||||
}
|
||||
catch (TargetInvocationException ex)
|
||||
catch (TargetInvocationException ex) when (ex.InnerException != null)
|
||||
{
|
||||
ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
|
||||
// The above line will always throw, but the compiler requires we throw explicitly.
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,4 +12,4 @@ namespace Microsoft.AspNetCore.Testing.xunit
|
|||
public class ConditionalFactAttribute : FactAttribute
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue