We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94f7ce0 commit bf6da6cCopy full SHA for bf6da6c
src/Operation/ListIndexes.php
@@ -19,6 +19,7 @@
19
20
use EmptyIterator;
21
use MongoDB\Driver\Command;
22
+use MongoDB\Driver\Exception\CommandException;
23
use MongoDB\Driver\Exception\RuntimeException as DriverRuntimeException;
24
use MongoDB\Driver\Server;
25
use MongoDB\Driver\Session;
@@ -135,7 +136,7 @@ private function executeCommand(Server $server)
135
136
137
try {
138
$cursor = $server->executeReadCommand($this->databaseName, new Command($cmd), $this->createOptions());
- } catch (DriverRuntimeException $e) {
139
+ } catch (CommandException $e) {
140
/* The server may return an error if the collection does not exist.
141
* Check for possible error codes (see: SERVER-20463) and return an
142
* empty iterator instead of throwing.
0 commit comments