Revision 4440
Added by daigle over 15 years ago
LDAPAdmin.java | ||
---|---|---|
38 | 38 |
import org.apache.log4j.Logger; |
39 | 39 |
|
40 | 40 |
import edu.ucsb.nceas.metacat.service.PropertyService; |
41 |
import edu.ucsb.nceas.metacat.util.LDAPUtil; |
|
42 | 41 |
import edu.ucsb.nceas.metacat.util.RequestUtil; |
43 |
import edu.ucsb.nceas.metacat.util.UtilException; |
|
44 | 42 |
import edu.ucsb.nceas.utilities.FileUtil; |
45 | 43 |
import edu.ucsb.nceas.utilities.GeneralPropertyException; |
46 | 44 |
import edu.ucsb.nceas.utilities.MetaDataProperty; |
... | ... | |
170 | 168 |
// Try to create data file and backup directories if |
171 | 169 |
// necessary. |
172 | 170 |
String backupDir = PropertyService.getBackupDir(); |
173 |
if (!FileUtil.createDirectory(backupDir)) { |
|
174 |
String errorString = "Could not create directory: " + backupDir; |
|
171 |
try { |
|
172 |
FileUtil.createDirectory(backupDir); |
|
173 |
} catch (IOException ioe) { |
|
174 |
String errorString = "Could not create directory: " + backupDir |
|
175 |
+ " : " + ioe.getMessage(); |
|
175 | 176 |
logMetacat.error(errorString); |
176 | 177 |
validationErrors.add(errorString); |
177 | 178 |
} |
... | ... | |
188 | 189 |
+ "processing LDAP properties page: " + gpe.getMessage(); |
189 | 190 |
logMetacat.error(errorMessage); |
190 | 191 |
processingErrors.add(errorMessage); |
191 |
} catch (IOException ioe) { |
|
192 |
String errorMessage = "IO problem while processing LDAP " |
|
193 |
+ "properties page: " + ioe.getMessage(); |
|
194 |
logMetacat.error(errorMessage); |
|
195 |
processingErrors.add(errorMessage); |
|
196 | 192 |
} |
197 | 193 |
|
198 | 194 |
try { |
Also available in: Unified diff
change the FileUtil.createDirectory calls to catch an exception on error.