Skip to content
Merged
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
30 changes: 24 additions & 6 deletions BitFaster.Caching/Throw.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,35 @@ namespace BitFaster.Caching
{
internal static class Throw
{
public static void ArgNull(ExceptionArgument arg) => throw CreateArgumentNullException(arg);

public static void ArgOutOfRange(string paramName) => throw CreateArgumentOutOfRangeException(paramName);

#if NETCOREAPP3_0_OR_GREATER
[DoesNotReturn]
#endif
public static void ArgNull(ExceptionArgument arg) => throw CreateArgumentNullException(arg);

#if NETCOREAPP3_0_OR_GREATER
[DoesNotReturn]
#endif
public static void ArgOutOfRange(string paramName) => throw CreateArgumentOutOfRangeException(paramName);

#if NETCOREAPP3_0_OR_GREATER
[DoesNotReturn]
#endif
public static void ArgOutOfRange(string paramName, string message) => throw CreateArgumentOutOfRangeException(paramName, message);

[ExcludeFromCodeCoverage]
public static void InvalidOp(string message) => throw CreateInvalidOperationException(message);

#if NETCOREAPP3_0_OR_GREATER
[DoesNotReturn]
#endif
public static void InvalidOp(string message) => throw CreateInvalidOperationException(message);

#if NETCOREAPP3_0_OR_GREATER
[DoesNotReturn]
#endif
public static void ScopedRetryFailure() => throw CreateScopedRetryFailure();

#if NETCOREAPP3_0_OR_GREATER
[DoesNotReturn]
#endif
public static void Disposed<T>() => throw CreateObjectDisposedException<T>();

[MethodImpl(MethodImplOptions.NoInlining)]
Expand Down