code: private String getDetailsAsHTML(String title, Level level, Throwable e) {
          if (e != null) {
              // convert the stacktrace into a more pleasent bit of HTML
              StringBuffer html = new StringBuffer("<html>");
              html.append("<h2>" + escapeXml(title) + "</h2>");
              html.append("<HR size='1' noshade>");
              html.append("<div></div>");
              html.append("<b>Message:</b>");
              html.append("<pre>");
              html.append("    " + escapeXml(e.toString()));
              html.append("</pre>");
              html.append("<b>Level:</b>");
              html.append("<pre>");
              html.append("    " + level);
              html.append("</pre>");
              html.append("<b>Stack Trace:</b>");
              html.append("<pre>");
              for (StackTraceElement el : e.getStackTrace()) {
                  html.append("    " + el.toString().replace("<init>", "&lt;init&gt;") + "\n");
              }
              if (e.getCause() != null) {
                  html.append("</pre>");
                  html.append("<b>Cause:</b>");
                  html.append("<pre>");
                  html.append(e.getCause().getMessage());
                  html.append("</pre><pre>");
                  for (StackTraceElement el : e.getCause().getStackTrace()) {
                      html.append("    " + el.toString().replace("<init>", "&lt;init&gt;") + "\n");
                  }
              }
              html.append("</pre></html>");
              return html.toString();
          } else {
              return null;
          }
      }
docs: Creates and returns HTML representing the details of this incident info. This method is only called if
  the details needs to be generated: ie: the detailed error message property of the incident info is
  null.