Exceptions
PHP Manual

The MongoException class

Introduction

Default Mongo exception.

This covers a bunch of different error conditions that may eventually be moved to more specific exceptions, but will always extend MongoException.

  • non-utf8 string

    This error occurs if you attempt to send a non-utf8 string to the database. All strings going into the database should be UTF8. See php.ini options for the transition option of quieting this exception.

  • invalid regex

    The regex you passed in does not match the form /regex/flags.

  • The MongoSomething object has not been correctly initialized by its constructor

    Probably your Mongo object is not connected to a database server.

Class synopsis

extends Exception {
}

Exceptions
PHP Manual