code: private final String renderContentTemplate(final ST contentTemplate, final Map<String, Object> values, final ErrorBuffer error, boolean inErrorState) {
          if (contentTemplate != null) { // it has to be possible to use a layout without defining a template
              try (Writer sw = new StringBuilderWriter()) {
              
                  final ErrorBuffer templateErrors = new ErrorBuffer();
                  renderContentTemplate(contentTemplate, sw, values/*, language*/, templateErrors);
                  
                  // handle potential errors
                  if (!templateErrors.errors.isEmpty() && !inErrorState) {
                      for (STMessage err : templateErrors.errors) {
                          if (err.error == ErrorType.INTERNAL_ERROR) {
                              log.warn("Reloading GroupDir as we have found a problem during rendering of template \"{}\"\n{}",contentTemplate.getName(), templateErrors.errors.toString());
                              //README when errors occur, try to reload the specified templates and try the whole thing again
                              // this often rectifies the problem
                              reloadGroup();
                              ST reloadedContentTemplate = readTemplate(contentTemplate.getName());
                              return renderContentTemplate(reloadedContentTemplate, values, error, true);
                          }
                      }
                  }
      
                  return sw.toString();
              } catch (IOException noMethodsThrowsIOE) { }
          }
          return "";
      }
docs: Renders template into string
  @return The rendered template if exists, or empty string