code.onehippo.org is currently readonly. We are migrating to code.bloomreach.com, please continue working there on Monday 14/12. See: https://docs.bloomreach.com/display/engineering/GitLab

Commit 305da3cd authored by Ard Schrijvers's avatar Ard Schrijvers

REPO-1913 Improve logging and exception handling to make sure the cause is preserved

parent 9ade7341
......@@ -224,14 +224,14 @@ public class RepositoryServlet extends HttpServlet {
}
}, RepositoryClusterService.class);
} catch (MalformedURLException ex) {
log.error("MalformedURLException exception: " + bindingAddress, ex);
throw new ServletException("RemoteException: " + ex.getMessage());
log.error("MalformedURLException exception: {}", bindingAddress, ex);
throw new ServletException(ex);
} catch (RemoteException ex) {
log.error("Generic remoting exception: " + bindingAddress, ex);
throw new ServletException("RemoteException: " + ex.getMessage());
log.error("Generic remoting exception: {}", bindingAddress, ex);
throw new ServletException(ex);
} catch (RepositoryException ex) {
log.error("Error while setting up JCR repository: ", ex);
throw new ServletException("RepositoryException: " + ex.getMessage());
throw new ServletException(ex);
}
freeMarkerConfiguration = createFreemarkerConfiguration();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment