} catch (NamingException e) {
if (e instanceof InvalidSearchFilterException) {
InvalidSearchFilterException fException = (InvalidSearchFilterException) e;
String message = "The ldap group filter defined is invalid ";
log.error(message, fException);
throw new LdapFilterException(message + " " + fException.getMessage());
}
//TODO: check for ldap connection/unavailable/etc. exceptions.
else {
log.error("LDAP communication error: " + e.getMessage(), e);
throw new LdapCommunicationException(e);