Package com.google.template.soy.tofu

Examples of com.google.template.soy.tofu.SoyTofuException



  @Override public void addToCache(
      @Nullable SoyMsgBundle msgBundle, @Nullable SoyCssRenamingMap cssRenamingMap) {
    if (!isCaching) {
      throw new SoyTofuException("Cannot addToCache() when isCaching is false.");
    }

    apiCallScope.enter();
    try {
      ApiCallScopeUtils.seedSharedParams(
View Full Code Here



  @Override public ImmutableSortedSet<String> getUsedIjParamsForTemplate(String templateName) {
    TemplateNode template = templateRegistryForNoCaching.getBasicTemplate(templateName);
    if (template == null) {
      throw new SoyTofuException("Template '" + templateName + "' not found.");
    }
    IjParamsInfo ijParamsInfo = templateToIjParamsInfoMap.get(template);
    // TODO: Ideally we'd check that there are no external calls, but we find that in practice many
    // users have written templates that conditionally call to undefined templates. Instead,
    // we'll return a best effor set of what we have here, and over time, we'll encourage users to
View Full Code Here

      @Nullable SoyMapData data, @Nullable SoyMapData ijData, Set<String> activeDelPackageNames,
      @Nullable SoyMsgBundle msgBundle, @Nullable SoyCssRenamingMap cssRenamingMap) {

    TemplateNode template = templateRegistry.getBasicTemplate(templateName);
    if (template == null) {
      throw new SoyTofuException("Attempting to render undefined template '" + templateName + "'.");
    }

    if (data == null) {
      data = new SoyMapData();
    }

    try {
      RenderVisitor rv = tofuRenderVisitorFactory.create(
          outputBuf, templateRegistry, data, ijData, null, activeDelPackageNames, msgBundle,
          cssRenamingMap);
      rv.exec(template);

    } catch (RenderException re) {
      throw new SoyTofuException(re);
    }
  }
View Full Code Here

TOP

Related Classes of com.google.template.soy.tofu.SoyTofuException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.