Skip to content

Commit c06a885

Browse files
committed
Fix exceptions creation.
1 parent 32b1b64 commit c06a885

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Shared/Throw.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void IfNull([NotNull] object? value, [CallerArgumentExpression(nam
3030
if (message is null)
3131
throw new ArgumentNullException(paramName);
3232
else
33-
throw new ArgumentNullException(message, paramName);
33+
throw new ArgumentNullException(paramName, message);
3434
}
3535
}
3636

@@ -89,7 +89,7 @@ public static void IfOutOfRange(int min, int max, int value, [CallerArgumentExpr
8989
if (message is null)
9090
throw new ArgumentOutOfRangeException(paramName);
9191
else
92-
throw new ArgumentOutOfRangeException(message, paramName);
92+
throw new ArgumentOutOfRangeException(paramName, message);
9393
}
9494
}
9595

0 commit comments

Comments
 (0)