diff --git a/include/class_objects.inc b/include/class_objects.inc
index e4dc00620618ea75fa91c7cd92fdc3ff4c3fcfc2..03c94d7c846b6a39c23a25bc0c09bfa787941d57 100644
--- a/include/class_objects.inc
+++ b/include/class_objects.inc
@@ -127,7 +127,7 @@ class objects
     $ldap->cd($ou);
     $ldap->search($filter, $search_attrs);
     if (!$ldap->success()) {
-      throw new Exception($ldap->get_error());
+      throw new LDAPFailureException($ldap->get_error());
     }
     return $ldap;
   }