Revision 5076
Added by daigle over 14 years ago
AuthAdmin.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
package edu.ucsb.nceas.metacat.admin; |
28 | 28 |
|
29 |
import java.io.IOException; |
|
30 | 29 |
import java.net.ConnectException; |
31 | 30 |
import java.util.Set; |
32 | 31 |
import java.util.SortedMap; |
33 | 32 |
import java.util.Vector; |
34 | 33 |
|
35 |
import javax.servlet.ServletException; |
|
36 | 34 |
import javax.servlet.http.HttpServletRequest; |
37 | 35 |
import javax.servlet.http.HttpServletResponse; |
38 | 36 |
|
... | ... | |
40 | 38 |
|
41 | 39 |
import edu.ucsb.nceas.metacat.AuthSession; |
42 | 40 |
import edu.ucsb.nceas.metacat.properties.PropertyService; |
41 |
import edu.ucsb.nceas.metacat.shared.MetacatUtilException; |
|
43 | 42 |
import edu.ucsb.nceas.metacat.util.RequestUtil; |
44 | 43 |
import edu.ucsb.nceas.utilities.GeneralPropertyException; |
45 | 44 |
import edu.ucsb.nceas.utilities.MetaDataProperty; |
... | ... | |
135 | 134 |
} catch (GeneralPropertyException gpe) { |
136 | 135 |
throw new AdminException("AuthAdmin.configureAuth - Problem getting property " + |
137 | 136 |
"while initializing LDAP properties page: " + gpe.getMessage()); |
138 |
} catch (IOException ioe) { |
|
139 |
throw new AdminException("AuthAdmin.configureAuth - IO problem while initializing " |
|
140 |
+ "LDAP properties page:" + ioe.getMessage()); |
|
141 |
} catch (ServletException se) { |
|
142 |
throw new AdminException("AuthAdmin.configureAuth - problem forwarding request while " |
|
143 |
+ "initializing LDAP properties page: " + se.getMessage()); |
|
144 |
} |
|
137 |
} catch (MetacatUtilException mue) { |
|
138 |
throw new AdminException("AuthAdmin.configureAuth - Utility problem while initializing " |
|
139 |
+ "LDAP properties page:" + mue.getMessage()); |
|
140 |
} |
|
145 | 141 |
} else { |
146 | 142 |
// The configuration form is being submitted and needs to be |
147 | 143 |
// processed. |
... | ... | |
227 | 223 |
RequestUtil.forwardRequest(request, response, |
228 | 224 |
"/admin?configureType=configure&processForm=false", null); |
229 | 225 |
} |
230 |
} catch (ServletException se) { |
|
231 |
throw new AdminException("AuthAdmin.configureAuth - problem forwarding request while " |
|
232 |
+ "processing LDAP properties page: " + se.getMessage()); |
|
233 |
} catch (IOException ioe) { |
|
234 |
throw new AdminException("AuthAdmin.configureAuth - IO problem while processing Authentication " |
|
235 |
+ "properties page: " + ioe.getMessage()); |
|
226 |
} catch (MetacatUtilException mue) { |
|
227 |
throw new AdminException("AuthAdmin.configureAuth - utility problem forwarding request while " |
|
228 |
+ "processing LDAP properties page: " + mue.getMessage()); |
|
236 | 229 |
} catch (GeneralPropertyException gpe) { |
237 | 230 |
String errorMessage = "AuthAdmin.configureAuth - Problem getting or setting property while " |
238 | 231 |
+ "processing Authentication properties page: " + gpe.getMessage(); |
Also available in: Unified diff
Change RequestUtil forwardRequest() method to throw MetacatUtilException.