Exception classes
The class hierarchy for MongoDB exceptions is modeled after that of the SPL Exceptions. Base classes extend their SPL counterpart and all exception classes in the extension implement the MongoDB\Driver\Exception\Exception interface.
Authenticationexception Bulkwriteexception Bulkwritecommandexception Commandexception Connectionexception Connectiontimeoutexception Encryptionexception Exception Executiontimeoutexception Invalidargumentexception Logicexception Runtimeexception Serverexception Sslconnectionexception Unexpectedvalueexception Writeexception
The class hierarchy for MongoDB exceptions is modeled after that of the SPL Exceptions. Base classes extend their SPL counterpart and all exception classes in the extension implement the MongoDB\Driver\Exception\Exception interface.
MongoDB\Driver\Exception\LogicException(extendsLogicException)MongoDB\Driver\Exception\InvalidArgumentException(extendsInvalidArgumentException)MongoDB\Driver\Exception\UnexpectedValueException(extendsUnexpectedValueException)MongoDB\Driver\Exception\RuntimeException(extendsRuntimeException)MongoDB\Driver\Exception\ConnectionExceptionMongoDB\Driver\Exception\AuthenticationExceptionMongoDB\Driver\Exception\ConnectionTimeoutExceptionMongoDB\Driver\Exception\SSLConnectionException(deprecated)
MongoDB\Driver\Exception\EncryptionExceptionMongoDB\Driver\Exception\ServerExceptionMongoDB\Driver\Exception\BulkWriteCommandExceptionMongoDB\Driver\Exception\CommandExceptionMongoDB\Driver\Exception\ExecutionTimeoutExceptionMongoDB\Driver\Exception\WriteException(deprecated)MongoDB\Driver\Exception\BulkWriteException