From 92d1ac381147584a077af75a871d6b22ff76235b Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 30 Mar 2010 22:41:24 +0000 Subject: [PATCH] - Improved the error reporting mechanism in LDAP setting. - improved FormValidation.error(...) so that one can easily send the full stack trace. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@29612 71c3de6d-444a-0410-be80-ed276b4c234a Originally-Committed-As: a168fc472af52fcf4f3f4f3dbdccb1cf807a4c56 --- core/src/main/java/hudson/security/LDAPSecurityRealm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/security/LDAPSecurityRealm.java b/core/src/main/java/hudson/security/LDAPSecurityRealm.java index ab16a30..d38bfee 100644 --- a/core/src/main/java/hudson/security/LDAPSecurityRealm.java +++ b/core/src/main/java/hudson/security/LDAPSecurityRealm.java @@ -519,12 +519,12 @@ public class LDAPSecurityRealm extends SecurityRealm { } catch (UnknownHostException x) { return FormValidation.error(Messages.LDAPSecurityRealm_UnknownHost(x.getMessage())); } catch (IOException x) { - return FormValidation.error(Messages.LDAPSecurityRealm_UnableToConnect(server, x.getMessage())); + return FormValidation.error(x,Messages.LDAPSecurityRealm_UnableToConnect(server, x.getMessage())); } // otherwise we don't know what caused it, so fall back to the general error report // getMessage() alone doesn't offer enough - return FormValidation.error(Messages.LDAPSecurityRealm_UnableToConnect(server, e)); + return FormValidation.error(e,Messages.LDAPSecurityRealm_UnableToConnect(server, e)); } catch (NumberFormatException x) { // The getLdapCtxInstance method throws this if it fails to parse the port number return FormValidation.error(Messages.LDAPSecurityRealm_InvalidPortNumber());