public void render(HttpServletRequest request, HttpServletResponse response, Handler handler)
throws Exception {
Exception e = (Exception) request.getAttribute(exceptionName);
Response res = new Response();
res.setError(true);
String raw = new BeanToJsonConverter().convert(e);
JSONObject error = new JSONObject(raw);
if (raw.startsWith("{")) {
error.put("screen", request.getAttribute("screen"));
}
res.setValue(error.toString());
request.setAttribute(propertyName, res);
super.render(request, response, handler);
}