code: private void reportError(ErrorReporter errorReporter, SoyAutoescapeException e) {
      // First, get to the root cause of the exception, and assemble an error message indicating
      // the full call stack that led to the failure.
      String message = "- " + e.getOriginalMessage();
      while (e.getCause() instanceof SoyAutoescapeException) {
        e = (SoyAutoescapeException) e.getCause();
        message += "\n- " + e.getMessage();
      }
      errorReporter.report(e.getSourceLocation(), AUTOESCAPE_ERROR, message);
    }
docs: Reports an autoescape exception.