Revision 6950
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 |
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 |
} |
|
199 |
|
|
211 | 200 |
} catch (GeneralPropertyException ge) { |
212 | 201 |
String errorMessage = |
213 | 202 |
"MetacatAdminServlet.handleGetOrPost - Property problem while handling request: " + ge.getMessage(); |
... | ... | |
229 | 218 |
logMetacat.error(errorMessage); |
230 | 219 |
processingErrors.add(errorMessage); |
231 | 220 |
} |
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 |
} |
|
232 | 241 |
} |
233 | 242 |
} |
Also available in: Unified diff
report processing errors after exceptions have been caught and recorded, otherwise the web UI is blank and there is no clue what happened unless you look in the logs.