Merged V3.0 to HEAD

11535: Fix ETHREEOH-519, ETHREEOH-23, ETHREEOH-24, ETHREEOH-58, ETHREEOH-449, ETHREEOH-30, ETHREEOH-19, ETHREEOH-561, ETHREEOH-537, ETHREEOH-567, ETHREEOH-568, ETHREEOH-113, ETHREEOH-130, ETHREEOH-115, ETHREEOH-566, ETHREEOH-572, ETHREEOH-82.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12450 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2008-12-17 14:28:44 +00:00
parent 9cfb7526d7
commit a3ba346406
3 changed files with 63 additions and 39 deletions

View File

@@ -204,27 +204,7 @@ public class StreamContent extends AbstractWebScript
}
catch(Throwable e)
{
if (logger.isInfoEnabled())
logger.info("Caught exception & redirecting to status template: " + e.getMessage());
// extract status code, if specified
int statusCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
if (e instanceof WebScriptException)
{
statusCode = ((WebScriptException)e).getStatus();
}
// send status
Status status = new Status();
status.setCode(statusCode);
status.setMessage(e.getMessage());
status.setException(e);
Cache cache = new Cache();
cache.setNeverCache(true);
Map<String, Object> customModel = new HashMap<String, Object>(8, 1.0f);
customModel.put("status", status);
Map<String, Object> templateModel = createTemplateParameters(req, res, customModel);
sendStatus(req, res, status, cache, format, templateModel);
throw createStatusException(e, req, res);
}
}