From 4b0a39b2067411926b49ba1ae33b2e1cd8296bb2 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Thu, 29 Jan 2009 17:02:28 +0000 Subject: [PATCH] made it possible to distinguish "no such user" from "I don't know if there's such an user", so that the UI can use this to improve error diagnostics. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@14871 71c3de6d-444a-0410-be80-ed276b4c234a Originally-Committed-As: 23bafefcf3b254c76f7d2744523bf117f37b9d88 --- core/src/main/java/hudson/security/LDAPSecurityRealm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/hudson/security/LDAPSecurityRealm.java b/core/src/main/java/hudson/security/LDAPSecurityRealm.java index 3bf9394..c8b6375 100644 --- a/core/src/main/java/hudson/security/LDAPSecurityRealm.java +++ b/core/src/main/java/hudson/security/LDAPSecurityRealm.java @@ -187,7 +187,7 @@ public class LDAPSecurityRealm extends SecurityRealm { return ldapSerach.searchForUser(username); } catch (LdapDataAccessException e) { LOGGER.log(Level.WARNING, "Failed to search LDAP for username="+username,e); - throw new UsernameNotFoundException(e.getMessage(),e); + throw new UserMayOrMayNotExistException(e.getMessage(),e); } } });