Changed to use exceptions from ldap module