add ldap print error log (#6068)

This commit is contained in:
andotorg 2021-06-15 20:16:38 +08:00 committed by GitHub
parent 4df0cd0c7c
commit 1c85051e0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,11 @@ public class LdapAuthenticationProvider implements AuthenticationProvider {
try {
ctx = new InitialLdapContext(env, null);
} catch (CommunicationException e) {
LOG.error("LDAP Service connect timeout:{}", e.getMessage());
throw new RuntimeException("LDAP Service connect timeout");
} catch (javax.naming.AuthenticationException e) {
LOG.error("login error:{}", e.getMessage());
throw new RuntimeException("login error!");
} catch (Exception e) {
LOG.warn("Exception cause by:{}", e.getMessage());
return false;