Commit 54098cdb authored by Matt Tucker's avatar Matt Tucker Committed by matt

More error handling.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@524 b35dd754-fafc-0310-a699-88a17e54d16e
parent 038b3a22
...@@ -69,19 +69,26 @@ public class PluginServlet extends HttpServlet { ...@@ -69,19 +69,26 @@ public class PluginServlet extends HttpServlet {
return; return;
} }
else { else {
// Handle JSP requests. try {
if (pathInfo.endsWith(".jsp")) { // Handle JSP requests.
handleJSP(pathInfo, request, response); if (pathInfo.endsWith(".jsp")) {
return; handleJSP(pathInfo, request, response);
} return;
// Handle image requests. }
else if (pathInfo.endsWith(".gif") || pathInfo.endsWith(".png")) { // Handle image requests.
handleImage(pathInfo, response); else if (pathInfo.endsWith(".gif") || pathInfo.endsWith(".png")) {
return; handleImage(pathInfo, response);
return;
}
// Anything else results in a 404.
else {
response.setStatus(HttpServletResponse.SC_NOT_FOUND);
return;
}
} }
// Anything else results in a 404. catch (Exception e) {
else { Log.error(e);
response.setStatus(HttpServletResponse.SC_NOT_FOUND); response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return; return;
} }
} }
...@@ -135,7 +142,7 @@ public class PluginServlet extends HttpServlet { ...@@ -135,7 +142,7 @@ public class PluginServlet extends HttpServlet {
} }
} }
catch (Throwable e) { catch (Throwable e) {
e.printStackTrace(); Log.error(e);
} }
} }
......
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