- :type msgid: string
- :returns: :class:`Message` or `None` if no message is found or
- if any xapian exception or out-of-memory situation
- occurs. Do note that Xapian Exceptions include
- "Database modified" situations, e.g. when the
- notmuch database has been modified by
- another program in the meantime. A return value of
- `None` is therefore no guarantee that the message
- does not exist.
- :exception: :exc:`NotmuchError` with :attr:`STATUS`.NOT_INITIALIZED if
- the database was not intitialized.
+ :type msgid: unicode or str
+ :returns: :class:`Message` or `None` if no message is found.
+ :exception:
+ :exc:`OutOfMemoryError`
+ If an Out-of-memory occured while constructing the message.
+ :exc:`XapianError`
+ In case of a Xapian Exception. These exceptions
+ include "Database modified" situations, e.g. when the
+ notmuch database has been modified by another program
+ in the meantime. In this case, you should close and
+ reopen the database and retry.
+
+ :exc:`NotInitializedError` if
+ the database was not intitialized.