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