Package com.google.template.soy.tofu.restricted

Examples of com.google.template.soy.tofu.restricted.SoyTofuFunction



  @Override protected SoyData computeFunction(
      String fnName, List<SoyData> args, FunctionNode fnNode) {

    SoyTofuFunction fn = soyTofuFunctionsMap.get(fnName);
    if (fn == null) {
      throw new RenderException(
          "Failed to find Soy function with name '" + fnName + "'" +
          " (function call \"" + fnNode.toSourceString() + "\").");
    }

    // Arity has already been checked by CheckFunctionCallsVisitor.

    try {
      return fn.computeForTofu(args);
    } catch (Exception e) {
      throw new RenderException(
          "Error while computing function \"" + fnNode.toSourceString() + "\": " + e.getMessage());
    }
  }
View Full Code Here

TOP

Related Classes of com.google.template.soy.tofu.restricted.SoyTofuFunction

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.