When logging an exception, log the stack trace as well.
This commit is contained in:
parent
223b64e07f
commit
ddd6a95420
18 changed files with 22 additions and 22 deletions
|
@ -110,7 +110,7 @@ public class EntityController extends VitroHttpServlet {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
req.setAttribute("javax.servlet.jsp.jspException",e);
|
req.setAttribute("javax.servlet.jsp.jspException",e);
|
||||||
RequestDispatcher rd = req.getRequestDispatcher("/error.jsp");
|
RequestDispatcher rd = req.getRequestDispatcher("/error.jsp");
|
||||||
rd.forward(req, res);
|
rd.forward(req, res);
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class Properties2PropertiesOperationController extends
|
||||||
try {
|
try {
|
||||||
response.sendRedirect(defaultLandingPage);
|
response.sendRedirect(defaultLandingPage);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class IndividualController extends FreemarkerHttpServlet {
|
||||||
return new TemplateResponseValues(template, body);
|
return new TemplateResponseValues(template, body);
|
||||||
|
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
return new ExceptionResponseValues(e);
|
return new ExceptionResponseValues(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class PageController extends FreemarkerHttpServlet{
|
||||||
ResponseValues rv = new TemplateResponseValues(getTemplate( mapForTemplate ), mapForTemplate);
|
ResponseValues rv = new TemplateResponseValues(getTemplate( mapForTemplate ), mapForTemplate);
|
||||||
return rv;
|
return rv;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
return new ExceptionResponseValues(e);
|
return new ExceptionResponseValues(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -380,7 +380,7 @@ public class JenaAdminActions extends BaseEditController {
|
||||||
try {
|
try {
|
||||||
taxonomyModel.write(response.getOutputStream());
|
taxonomyModel.write(response.getOutputStream());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class LoginTemplateHelper extends LoginTemplateHelperBase {
|
||||||
return doTemplate(vreq, showLoginScreen(vreq));
|
return doTemplate(vreq, showLoginScreen(vreq));
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
return doTemplate(vreq, showError(e));
|
return doTemplate(vreq, showError(e));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ public class LoginTemplateHelper extends LoginTemplateHelperBase {
|
||||||
return showLoginScreen(vreq);
|
return showLoginScreen(vreq);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
return showError(e);
|
return showError(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1043,7 +1043,7 @@ public class IndividualJena extends IndividualImpl implements Individual {
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1431,7 +1431,7 @@ public class IndividualSDB extends IndividualImpl implements Individual {
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -475,7 +475,7 @@ public class JenaBaseDao extends JenaBaseDaoCon {
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Error in updatePropertyDateTimeValue");
|
log.error("Error in updatePropertyDateTimeValue");
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class KeywordDaoJena extends JenaBaseDao implements KeywordDao {
|
||||||
try {
|
try {
|
||||||
keywordURI = webappDaoFactory.getIndividualDao().insertNewIndividual(keywordIndividual);
|
keywordURI = webappDaoFactory.getIndividualDao().insertNewIndividual(keywordIndividual);
|
||||||
} catch (InsertException e) {
|
} catch (InsertException e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
log.debug("KeywordDaoJena.insertNewKeyword() : "+keywordURI);
|
log.debug("KeywordDaoJena.insertNewKeyword() : "+keywordURI);
|
||||||
|
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class ModelAuditor implements ModelChangedListener {
|
||||||
|
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,7 @@ public class PropertyDaoJena extends JenaBaseDao implements PropertyDao {
|
||||||
} catch (Exception cce) {}
|
} catch (Exception cce) {}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
} finally {
|
} finally {
|
||||||
getOntModel().leaveCriticalSection();
|
getOntModel().leaveCriticalSection();
|
||||||
}
|
}
|
||||||
|
@ -170,7 +170,7 @@ public class PropertyDaoJena extends JenaBaseDao implements PropertyDao {
|
||||||
} catch (Exception cce) {}
|
} catch (Exception cce) {}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
} finally {
|
} finally {
|
||||||
getOntModel().leaveCriticalSection();
|
getOntModel().leaveCriticalSection();
|
||||||
}
|
}
|
||||||
|
@ -250,7 +250,7 @@ public class PropertyDaoJena extends JenaBaseDao implements PropertyDao {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
} finally {
|
} finally {
|
||||||
getOntModel().leaveCriticalSection();
|
getOntModel().leaveCriticalSection();
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class RDBGraphGenerator implements GraphGenerator {
|
||||||
Graph graphRDB = new GraphRDB(idbConn, graphID, requestedProperties, GraphRDB.OPTIMIZE_ALL_REIFICATIONS_AND_HIDE_NOTHING, !modelExists);
|
Graph graphRDB = new GraphRDB(idbConn, graphID, requestedProperties, GraphRDB.OPTIMIZE_ALL_REIFICATIONS_AND_HIDE_NOTHING, !modelExists);
|
||||||
return graphRDB;
|
return graphRDB;
|
||||||
} catch (SQLException e) {
|
} catch (SQLException e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
throw new RuntimeException("SQLException: unable to regenerate graph", e);
|
throw new RuntimeException("SQLException: unable to regenerate graph", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class EditN3Utils {
|
||||||
//
|
//
|
||||||
// } catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
// log.error("Error in updatePropertyDateTimeValue");
|
// log.error("Error in updatePropertyDateTimeValue");
|
||||||
// log.error(e);
|
// log.error(e, e);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class EditSubmission {
|
||||||
try {
|
try {
|
||||||
return literalCreationModel.createTypedLiteral( URLEncoder.encode(value, "UTF8"), datatypeUri);
|
return literalCreationModel.createTypedLiteral( URLEncoder.encode(value, "UTF8"), datatypeUri);
|
||||||
} catch (UnsupportedEncodingException e) {
|
} catch (UnsupportedEncodingException e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return literalCreationModel.createTypedLiteral(value, datatypeUri);
|
return literalCreationModel.createTypedLiteral(value, datatypeUri);
|
||||||
|
|
|
@ -324,9 +324,9 @@ public class LuceneSearcher implements Searcher {
|
||||||
}
|
}
|
||||||
highlighter = new LuceneHighlighter( query, analyzer );
|
highlighter = new LuceneHighlighter( query, analyzer );
|
||||||
} catch (SearchException e) {
|
} catch (SearchException e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
return (VitroHighlighter)highlighter;
|
return (VitroHighlighter)highlighter;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class JenaPersistentDBOnlyDataSourceSetup extends JenaDataSourceSetupBase
|
||||||
OntModel infDbModel = ModelFactory.createOntologyModel(MEM_ONT_MODEL_SPEC,infDbPlainModel);
|
OntModel infDbModel = ModelFactory.createOntologyModel(MEM_ONT_MODEL_SPEC,infDbPlainModel);
|
||||||
sce.getServletContext().setAttribute("inferenceOntModel",infDbModel);
|
sce.getServletContext().setAttribute("inferenceOntModel",infDbModel);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
sce.getServletContext().setAttribute("jenaOntModel", memModel);
|
sce.getServletContext().setAttribute("jenaOntModel", memModel);
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class LoginWidget extends Widget {
|
||||||
values = showLoginScreen(request, siteName);
|
values = showLoginScreen(request, siteName);
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e);
|
log.error(e, e);
|
||||||
// This widget should display an error message rather than throwing the exception
|
// This widget should display an error message rather than throwing the exception
|
||||||
// up to the doMarkup() method, which would result in no display.
|
// up to the doMarkup() method, which would result in no display.
|
||||||
values = showError(e);
|
values = showError(e);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue