code: public void doErrorJSON(HttpServletRequest request,HttpServletResponse response,
  			IMSJSONRequest json, String message, Exception e)
  		throws java.io.IOException
  	{
  		if (e != null) {
  			M_log.log(Level.WARNING, e.getLocalizedMessage(), e);
  		}
          M_log.info(message);
  		String output = IMSJSONRequest.doErrorJSON(request, response, json, message, e);
  System.out.println(output);
      }
docs: /* IMS JSON version of Errors