[Zope-CVS] SVN: ldapadapter/trunk/exceptions.py New exceptions.

Florent Guillaume fg at nuxeo.com
Wed Oct 13 08:47:15 EDT 2004


Log message for revision 28071:
  New exceptions.
  

Changed:
  U   ldapadapter/trunk/exceptions.py

-=-
Modified: ldapadapter/trunk/exceptions.py
===================================================================
--- ldapadapter/trunk/exceptions.py	2004-10-13 12:46:53 UTC (rev 28070)
+++ ldapadapter/trunk/exceptions.py	2004-10-13 12:47:13 UTC (rev 28071)
@@ -24,11 +24,28 @@
 from zope.schema._bootstrapinterfaces import ValidationError
 
 
+class InvalidLDAPURI(ValidationError):
+    __doc__ = _("""The specified LDAP URI is not valid.""")
+
+
+# LDAP Adapter management errors
+
 class LDAPURIParseError(Exception):
     """The given ldap uri is not valid."""
 
 LDAP_uri_parse_error = _(u'The LDAP URI could not be parsed.')
 
 
-class InvalidLDAPURI(ValidationError):
-    __doc__ = _("""The specified LDAP URI is not valid.""")
+# LDAP Adapter exceptions
+
+class LDAPException(Exception):
+    """LDAP exception"""
+
+class ServerDown(LDAPException):
+    """The server doesn't answer"""
+
+class InvalidCredentials(LDAPException):
+    """The credentials are incorrect"""
+
+class NoSuchObject(LDAPException):
+    """The base object doesn't exist"""



More information about the Zope-CVS mailing list