* 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
writeResponse(request, response, reqtrans, restrans);
} catch (Exception x) {
log("Exception in execute", x);
try {
if (debug) {
sendError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"Server error: " + x);
x.printStackTrace();
} else {
sendError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
"The server encountered an error while processing your request. " +
"Please check back later.");
}
log("Exception in execute", x);
} catch (IOException iox) {
log("Exception in sendError", iox);
}