}
}
private void writeErrorResponse(HttpServletRequest req, HttpServletResponse resp,
String errorMessage) throws IOException {
ErrorVarsGsonImpl errorVars = new ErrorVarsGsonImpl();
errorVars.setErrorMessage(errorMessage);
setResponseHeaders(resp);
Wave.write(resp.getWriter(), new GxpContext(getLocale(req)),
analyticsAccount, clientVarString(null, null, errorVars), true,
inlineNocacheJs(), channelApiUrl);
}