* Avoid double stack trace printing in execute()

This commit is contained in:
hns 2007-03-30 10:54:34 +00:00
parent 2b5d5c089b
commit 4781c7a8ff

View file

@ -334,18 +334,16 @@ public abstract class AbstractServletClient extends HttpServlet {
// write response // write response
writeResponse(request, response, reqtrans, restrans); writeResponse(request, response, reqtrans, restrans);
} catch (Exception x) { } catch (Exception x) {
log("Exception in execute", x);
try { try {
if (debug) { if (debug) {
sendError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, sendError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Server error: " + x); "Server error: " + x);
x.printStackTrace();
} else { } else {
sendError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, sendError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"The server encountered an error while processing your request. " + "The server encountered an error while processing your request. " +
"Please check back later."); "Please check back later.");
} }
log("Exception in execute", x);
} catch (IOException iox) { } catch (IOException iox) {
log("Exception in sendError", iox); log("Exception in sendError", iox);
} }