private void writeExceptionToResponse(HttpServletResponse theResponse, BaseServerResponseException theException) throws IOException { theResponse.setStatus(theException.getStatusCode()); addHeadersToResponse(theResponse); if (theException.hasResponseHeaders()) { for (Entry<String, List<String>> nextEntry : theException.getResponseHeaders().entrySet()) { for (String nextValue : nextEntry.getValue()) { if (isNotBlank(nextValue)) { theResponse.addHeader(nextEntry.getKey(), nextValue); } } } } theResponse.setContentType("text/plain"); theResponse.setCharacterEncoding("UTF-8"); theResponse.getWriter().write(theException.getMessage()); }
if (theException.hasResponseHeaders()) { Map<String, List<String>> additional = theException.getResponseHeaders(); for (Entry<String, List<String>> next : additional.entrySet()) {
private void writeExceptionToResponse(HttpServletResponse theResponse, BaseServerResponseException theException) throws IOException { theResponse.setStatus(theException.getStatusCode()); addHeadersToResponse(theResponse); if (theException.hasResponseHeaders()) { for (Entry<String, List<String>> nextEntry : theException.getResponseHeaders().entrySet()) { for (String nextValue : nextEntry.getValue()) { if (isNotBlank(nextValue)) { theResponse.addHeader(nextEntry.getKey(), nextValue); } } } } theResponse.setContentType("text/plain"); theResponse.setCharacterEncoding("UTF-8"); theResponse.getWriter().write(theException.getMessage()); }
if (theException.hasResponseHeaders()) { Map<String, List<String>> additional = theException.getResponseHeaders(); for (Entry<String, List<String>> next : additional.entrySet()) {