String error = _getErrorString();
_LOG.severe(error, t);
ServletResponse response = (ServletResponse)ec.getResponse();
PrintWriter writer = response.getWriter();
XmlResponseWriter rw = new XmlResponseWriter(writer, "UTF-8");
rw.startDocument();
rw.startElement("partial-response", null);
rw.startElement("error", null);
rw.startElement("error-name", null);
rw.writeText(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, null);
rw.endElement("error-name");
rw.startElement("error-message", null);
rw.writeText(_getExceptionString(t) + _PLEASE_SEE_ERROR_LOG + error, null);
rw.endElement("error-message");
rw.endElement("error");
rw.endElement("partial-response");
rw.endDocument();
rw.close();
}