VIVO-363 Write the exception to the log, first thing.
This commit is contained in:
parent
dfc3163ac1
commit
3b6d65176d
1 changed files with 12 additions and 0 deletions
|
@ -5,7 +5,19 @@
|
|||
<%@ page import="com.oreilly.servlet.ServletUtils,edu.cornell.mannlib.vitro.webapp.web.*" %>
|
||||
<%@page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest"%>
|
||||
<%@page import="edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean"%>
|
||||
<%@page import="org.apache.commons.logging.Log"%>
|
||||
<%@page import="org.apache.commons.logging.LogFactory"%>
|
||||
<%
|
||||
// We have seen that this page can throw its own error.
|
||||
// Before it does so, be sure that we have written the original error to the log.
|
||||
Object c = request.getAttribute("javax.servlet.jsp.jspException");
|
||||
if (c instanceof Throwable) {
|
||||
Throwable cause = (Throwable) c;
|
||||
Log log = LogFactory.getLog(this.getClass());
|
||||
log.error("Error: ", cause);
|
||||
}
|
||||
|
||||
|
||||
VitroRequest vreq = new VitroRequest(request);
|
||||
ApplicationBean appBean = vreq.getAppBean();
|
||||
String themeDir = appBean.getThemeDir();
|
||||
|
|
Loading…
Add table
Reference in a new issue