Syncrepl Client Exceptions¶
When a Syncrepl
instance wants to tell you about
a problem, it raises an exception.
This document covers all of the exceptions thrown directly by
Syncrepl
. Note that you should also be prepared to
catch exceptions from ldap
, as those exceptions are allowed to percolate
up to the client, with only a few exceptions (for example, catching CANCELLED
and TIMEOUT exceptions when they are expected).
The exceptions raised by Syncrepl
are as follows:
-
exception
syncrepl_client.exceptions.
VersionError
(which, ours, db)[source]¶ Database is too new.
This exception is thrown when attempting to use a database that was either created with a newer version of syncrepl_client, or was created in a newer version of Python.
Class includes the following attributes:
- component: Either “python” or “syncrepl_client”.
- their_version: A tuple.
- our_version: Another tuple.
-
exception
syncrepl_client.exceptions.
ClosedError
[source]¶ Action performed on an unbound instance.
This exception is thrown when a call is made to an instance which has been unbound.
If you wish to reconnect to the server, you must use a new instance.
-
exception
syncrepl_client.exceptions.
LDAPUrlError
[source]¶ Generic LDAP URL-related exception.
All of the exceptions related to LDAP URLs are subclasses of this exception.
-
exception
syncrepl_client.exceptions.
LDAPUrlConflict
(current_url, new_url)[source]¶ Thrown when a URL conflicts with an existing URL.
This exception is thrown when a data store already has a URL, and the client provided a new LDAP URL that conflicts.
The following attributes should be checked:
- The search base DN.
- The search scope.
- The search filter.
- The list of attributes to return.
If any of the above attributes conflict, this exception is thrown.
Attributes:
current_url – An
LDAPUrl
object; the current URL.new_url – An
LDAPUrl
object; the new, conflicting URL.