Revision 6951
Added by ben leinfelder almost 13 years ago
src/edu/ucsb/nceas/metacat/admin/MetacatAdminServlet.java | ||
---|---|---|
196 | 196 |
processingErrors.add(errorMessage); |
197 | 197 |
} |
198 | 198 |
|
199 |
|
|
199 |
if (processingErrors.size() > 0) { |
|
200 |
RequestUtil.clearRequestMessages(request); |
|
201 |
RequestUtil.setRequestErrors(request,processingErrors); |
|
202 |
// if the action that threw an exception was "configure" just go straight to the metacat |
|
203 |
// configuration. This will avoid a loop. Otherwise, call the admin servlet with |
|
204 |
// configuration action. |
|
205 |
if (action != null && action.equals("configure")) { |
|
206 |
RequestUtil.forwardRequest(request, response, "/admin/metacat-configuration.jsp", null); |
|
207 |
} else { |
|
208 |
RequestUtil.forwardRequest(request, response, "/admin?configureType=configure", null); |
|
209 |
} |
|
210 |
} |
|
200 | 211 |
} catch (GeneralPropertyException ge) { |
201 | 212 |
String errorMessage = |
202 | 213 |
"MetacatAdminServlet.handleGetOrPost - Property problem while handling request: " + ge.getMessage(); |
... | ... | |
218 | 229 |
logMetacat.error(errorMessage); |
219 | 230 |
processingErrors.add(errorMessage); |
220 | 231 |
} |
221 |
|
|
222 |
try { |
|
223 |
if (processingErrors.size() > 0) { |
|
224 |
RequestUtil.clearRequestMessages(request); |
|
225 |
RequestUtil.setRequestErrors(request,processingErrors); |
|
226 |
// if the action that threw an exception was "configure" just go straight to the metacat |
|
227 |
// configuration. This will avoid a loop. Otherwise, call the admin servlet with |
|
228 |
// configuration action. |
|
229 |
if (action != null && action.equals("configure")) { |
|
230 |
RequestUtil.forwardRequest(request, response, "/admin/metacat-configuration.jsp", null); |
|
231 |
} else { |
|
232 |
RequestUtil.forwardRequest(request, response, "/admin?configureType=configure", null); |
|
233 |
} |
|
234 |
} |
|
235 |
} catch (MetacatUtilException ue) { |
|
236 |
String errorMessage = |
|
237 |
"MetacatAdminServlet.handleGetOrPost -unrecoverable error, cannot report error to request: " + ue.getMessage(); |
|
238 |
logMetacat.error(errorMessage); |
|
239 |
// TODO: send something to output! |
|
240 |
} |
|
241 | 232 |
} |
242 | 233 |
} |
Also available in: Unified diff
rollback processing Error change -- creates a loop on error. ugh