Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix CA 1032
  • Loading branch information
Zombach committed Jul 12, 2024
commit 99e52d4aa67a7dfbe3cd4af013b5f9be9618f5ac
2 changes: 1 addition & 1 deletion src/Polly/Polly.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ProjectType>Library</ProjectType>
<MutationScore>70</MutationScore>
<IncludePollyUsings>true</IncludePollyUsings>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1032;CA1033;CA1051;CA1062;CA1063;CA1064;CA1710;CA1716;CA1724;CA1805;CA1815;CA1816;CA2211</NoWarn>
<NoWarn>$(NoWarn);CA1010;CA1031;CA1033;CA1051;CA1062;CA1063;CA1064;CA1710;CA1716;CA1724;CA1805;CA1815;CA1816;CA2211</NoWarn>
<NoWarn>$(NoWarn);S2223;S3215;S3246;S3971;S4039;S4049;S4457</NoWarn>
<!--Public API Analyzers: We do not need to fix these as it would break compatibility with released Polly versions-->
<NoWarn>$(NoWarn);RS0037;</NoWarn>
Expand Down
26 changes: 26 additions & 0 deletions src/Polly/RateLimit/RateLimitRejectedException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@ public class RateLimitRejectedException : ExecutionRejectedException
/// </summary>
public TimeSpan RetryAfter { get; private set; }

/// <summary>
/// Initializes a new instance of the <see cref="RateLimitRejectedException"/> class.
/// </summary>
public RateLimitRejectedException()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="RateLimitRejectedException"/> class.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public RateLimitRejectedException(string message)
: base(message)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="RateLimitRejectedException"/> class.
/// </summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="inner">The inner exception.</param>
public RateLimitRejectedException(string message, Exception inner)
: base(message, inner)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="RateLimitRejectedException"/> class.
/// </summary>
Expand Down
22 changes: 22 additions & 0 deletions src/Polly/Utilities/TimedLock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,30 @@ private class Sentinel

internal class LockTimeoutException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="LockTimeoutException"/> class.
/// </summary>
public LockTimeoutException()
: base("Timeout waiting for lock")
{
}

/// <summary>
/// Initializes a new instance of the <see cref="LockTimeoutException"/> class.
/// </summary>
/// <param name="message">The message that describes the error.</param>
public LockTimeoutException(string message)
: base(message)
{
}

/// <summary>
/// Initializes a new instance of the <see cref="LockTimeoutException"/> class.
/// </summary>
/// <param name="message">The message that describes the error.</param>
/// <param name="innerException">The inner exception.</param>
public LockTimeoutException(string message, Exception innerException)
: base(message, innerException)
{
}
}