File tree Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Expand file tree Collapse file tree 1 file changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,35 @@ namespace BitFaster.Caching
77{
88 internal static class Throw
99 {
10- public static void ArgNull ( ExceptionArgument arg ) => throw CreateArgumentNullException ( arg ) ;
11-
12- public static void ArgOutOfRange ( string paramName ) => throw CreateArgumentOutOfRangeException ( paramName ) ;
13-
10+ #if NETCOREAPP3_0_OR_GREATER
11+ [ DoesNotReturn ]
12+ #endif
13+ public static void ArgNull ( ExceptionArgument arg ) => throw CreateArgumentNullException ( arg ) ;
14+
15+ #if NETCOREAPP3_0_OR_GREATER
16+ [ DoesNotReturn ]
17+ #endif
18+ public static void ArgOutOfRange ( string paramName ) => throw CreateArgumentOutOfRangeException ( paramName ) ;
19+
20+ #if NETCOREAPP3_0_OR_GREATER
21+ [ DoesNotReturn ]
22+ #endif
1423 public static void ArgOutOfRange ( string paramName , string message ) => throw CreateArgumentOutOfRangeException ( paramName , message ) ;
1524
1625 [ ExcludeFromCodeCoverage ]
17- public static void InvalidOp ( string message ) => throw CreateInvalidOperationException ( message ) ;
18-
26+ #if NETCOREAPP3_0_OR_GREATER
27+ [ DoesNotReturn ]
28+ #endif
29+ public static void InvalidOp ( string message ) => throw CreateInvalidOperationException ( message ) ;
30+
31+ #if NETCOREAPP3_0_OR_GREATER
32+ [ DoesNotReturn ]
33+ #endif
1934 public static void ScopedRetryFailure ( ) => throw CreateScopedRetryFailure ( ) ;
2035
36+ #if NETCOREAPP3_0_OR_GREATER
37+ [ DoesNotReturn ]
38+ #endif
2139 public static void Disposed < T > ( ) => throw CreateObjectDisposedException < T > ( ) ;
2240
2341 [ MethodImpl ( MethodImplOptions . NoInlining ) ]
You can’t perform that action at this time.
0 commit comments