Skip to content

Commit

Permalink
Fix SA1108 and SA1118 (#2148)
Browse files Browse the repository at this point in the history
Remove SA1108 and SA1118 from `NoWarn` list.
  • Loading branch information
henriqueholtz committed Jun 7, 2024
1 parent 7b971f5 commit deb5087
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Polly/Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<IncludePollyUsings>true</IncludePollyUsings>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1032;CA1033;CA1051;CA1062;CA1063;CA1064;CA1068;CA1710;CA1716;CA1724;CA1805;CA1815;CA1816;CA2211</NoWarn>
<NoWarn>$(NoWarn);S2223;S3215;S3246;S3971;S4039;S4049;S4457</NoWarn>
<NoWarn>$(NoWarn);SA1108;SA1118;SA1414</NoWarn>
<NoWarn>$(NoWarn);SA1414</NoWarn>
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
<NoWarn>$(NoWarn);RS0037;</NoWarn>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Polly/Timeout/TimeoutEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ internal static class TimeoutEngine
*/
actionTask.Wait(timeoutCancellationTokenSource.Token);
}
catch (AggregateException ex) when (ex.InnerExceptions.Count == 1) // Issue #270. Unwrap extra AggregateException caused by the way pessimistic timeout policy for synchronous executions is necessarily constructed.
catch (AggregateException ex) when (ex.InnerExceptions.Count == 1)
{
// Issue #270. Unwrap extra AggregateException caused by the way pessimistic timeout policy for synchronous executions is necessarily constructed.
ExceptionDispatchInfo.Capture(ex.InnerException).Throw();
}

Expand Down

0 comments on commit deb5087

Please sign in to comment.