Skip to content

Commit f1cd24e

Browse files
committed
Pr
1 parent 1e830cf commit f1cd24e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MongoDB.Driver/MongoCollectionImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ public override void DropOne(IClientSessionHandle session, string name, DropInde
14731473
Ensure.IsNotNullOrEmpty(name, nameof(name));
14741474
if (name == "*")
14751475
{
1476-
throw new ArgumentException("Cannot specify '*' for the index name. Use DropAll and DropAllAsync to drop all indexes.", "name");
1476+
throw new ArgumentException($"Cannot specify '*' for the index name. Use {nameof(DropAll)} to drop all indexes.", nameof(name));
14771477
}
14781478

14791479
var operation = CreateDropOneOperation(name, options);
@@ -1498,7 +1498,7 @@ public override Task DropOneAsync(IClientSessionHandle session, string name, Dro
14981498
Ensure.IsNotNullOrEmpty(name, nameof(name));
14991499
if (name == "*")
15001500
{
1501-
throw new ArgumentException("Cannot specify '*' for the index name. Use DropAll and DropAllAsync to drop all indexes.", "name");
1501+
throw new ArgumentException($"Cannot specify '*' for the index name. Use {nameof(DropAllAsync)} to drop all indexes.", nameof(name));
15021502
}
15031503

15041504
var operation = CreateDropOneOperation(name, options);

0 commit comments

Comments
 (0)